-
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
feature(Navisworks): Enhance Selection Handling and Hierarchy Population #2641
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
Conversion and Progress both now operate on the Main Thread in harmony
Reduces the complexity of Send and increases area for testing
The good parts are now part of Element class
from selected child branches and leaf nodes
Refactored to separate methods for greater testing and adopts the SelectionBuilder and Elements class for previously inlined processing
…doId or ModelItem. Also add methods for building a nested object hierarchy from a dictionary of flat key-value pairs. Add Element class methods for creating and resolving elements by pseudoId or ModelItem. Also add methods for building a nested object hierarchy from a dictionary of flat key-value pairs.
This commit refactors the SelectionBuilder class to improve its performance. The changes include adding a HashSet for visited nodes, updating progress bar messages, and optimizing the PopulateHierarchyAndOmitHidden method. Additionally, a new method called ValidateStartNodes has been added to remove hidden nodes from the starting list of nodes if they are not visible in the model.
The changes in this commit refactor the code to improve its readability and maintainability. The changes include removing unnecessary parameters, renaming variables for clarity, and improving error handling.
This commit adds two new classes, FilterTypes and amends SelectionBuilder. The FilterTypes class contains constants for different types of filters, while the SelectionBuilder class handles getting objects from a filter and populating a hierarchy while omitting hidden items.
It makes the view active on the main thread, adds a check for null or empty _uniqueModelItems, and omits hidden items from the hierarchy. Additionally, it replaces some of the if statements with more concise expressions.
b9f9e9d
to
580aefc
Compare
876d4dc
to
580aefc
Compare
This commit refactors the SelectionBuilder class in ConnectorNavisworks/Other/SelectionBuilder.cs. The changes include removing unused code, adding comments for clarity, and improving variable names. These changes should make the code easier to read and maintain.
It now only sends the current view if no other views are selected regardless of the options setting
This commit improves the progress bar functionality by adding a fraction of remaining time to the ProgressLooper method. It also adds more descriptive messages to the ProgressBar.BeginSubOperation method in SelectionHandler class.
This commit refactors the ConnectorNavisworksBindings.Send.cs and ConverterNavisworks.ToSpeckle.cs files to handle saved viewpoints in Navisworks. The changes include creating a new SelectionHandler class, resolving saved viewpoints, and converting them to base objects.
This was
linked to
issues
Jun 8, 2023
Closed
Updates with an inheritance annotation.
fa0228e
to
f192596
Compare
AlanRynne
approved these changes
Jun 12, 2023
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.
Since this is touching only your connector, I'm approving this in the hopes it will be tested with the next WIP
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
enhancement
New feature or request
navisworks
issues related to Navisworks
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
This pull request focuses on enhancing the user experience and feedback during selection, conversion, and send operations in the Navisworks Connector. The primary goal is to improve the responsiveness and feedback provided to users during these operations, ensuring a more seamless and informative user experience.
The move from Depth-First conversion to Stack and rebuild allows for the granularity of feedback that is preferable at some small cost in setup and tree reconstruction.
Adding the Invoker class as a wrapper for anything that needs processing on the main thread may reopen the door to aggressive multithreading for everything that doesn't touch volatile memory.
Changes:
The main changes include:
Progress Feedback Improvements: The ProgressInvoker implementation (ProgressInvoker.cs) has been updated to address the issue of delayed UI updates during selection and conversion operations. Previously, selecting a root node would not update the UI until the entire hierarchy had been converted. The new implementation introduces a depth-first search and conversion approach, allowing the UI to update incrementally as elements are selected and converted. This improvement provides real-time feedback to users, making the process more transparent and responsive.
Selection and Conversion Handling: The SelectionBuilder class (
SelectionBuilder.cs
) has been introduced to handle the selection filtering and retrieval of model items. With this enhancement, the selection process is optimized, allowing for more efficient and accurate selection of elements. The updated selection handling improves the overall performance and usability of the connector. Added the SelectionBuilder class (SelectionBuilder.cs
) to filter and retrieve model items based on different selection criteria, such as manual selection, saved sets, views, and clashes. This improves the selection process by making it more efficient and accurate.Added a new Invoker class and refactored out of the Send method: The ProgressInvoker implementation (
Invokers.cs
) provides better feedback and improves the user experience during selection, conversion, and send operations. The previous implementation caused delays in UI updates, especially when selecting a root node, as the entire hierarchy needed to be converted before updating the UI. The new implementation updates the UI incrementally, providing real-time feedback and improving responsiveness.User Interface Updates: The Ribbon UI (
Ribbon.xaml.cs
) has been refined to provide a more intuitive and user-friendly interface. The UI updates enhance the overall navigation and interaction with the connector, contributing to a more seamless workflow. Refined the Ribbon UI (Ribbon.xaml.cs
) to enhance navigation and interaction with the Navisworks Connector. The updates improve the user experience by making the UI more intuitive and user-friendly, allowing users to access and utilize the connector's functionalities easily. Updated the SpeckleNavisworksCommand class (SpeckleNavisworksCommand.cs
) to adjust the size of the docking pane to accommodate the connector's UI elements better, providing a more optimal viewing experience for users.Housekeeping: Removed the ViewProxy class (
ViewProxy.cs
) as it was no longer needed and had become obsolete in the updated implementation.Fixes and Implementations:
#2599 - Default Pane size increased
#2299 - Granular Feedback
#2298 - Cancelling during conversions
#2515 - Full Hierarchical sends
Improvements to previous fixes
#2272 - Improves previous enhancement
#2270 - Improves previous enhancement