Reorder Helix elements for Isolate Geometry Mode to display isolated geometry#11163
Merged
aparajit-pratap merged 3 commits intoDynamoDS:masterfrom Oct 6, 2020
Merged
Reorder Helix elements for Isolate Geometry Mode to display isolated geometry#11163aparajit-pratap merged 3 commits intoDynamoDS:masterfrom
aparajit-pratap merged 3 commits intoDynamoDS:masterfrom
Conversation
aparajit-pratap
commented
Oct 5, 2020
Comment on lines
531
to
547
| if (Element3DDictionary == null) | ||
| { | ||
| sceneItems = new ObservableElement3DCollection(); | ||
| return; | ||
| } | ||
|
|
||
| var values = Element3DDictionary.Values.ToList(); | ||
| if (Camera != null) | ||
| { | ||
| values.Sort(new Element3DComparer(Camera.Position)); | ||
| } | ||
|
|
||
| if (sceneItems == null) | ||
| sceneItems = new ObservableElement3DCollection(); | ||
|
|
||
| sceneItems.Clear(); | ||
| sceneItems.AddRange(values); |
Contributor
Author
There was a problem hiding this comment.
This logic has been lifted off of UpdateSceneItems, however, UpdateSceneItems seems to be doing some extra work like cycling through the list of elements and updating vertices, triangles, and colors, which I'm not sure if that is necessary in this case. Skipping that saves some time.
mjkkirschner
reviewed
Oct 6, 2020
mjkkirschner
reviewed
Oct 6, 2020
| var values = Element3DDictionary.Values.ToList(); | ||
| if (Camera != null) | ||
| { | ||
| values.Sort(new Element3DComparer(Camera.Position)); |
Member
There was a problem hiding this comment.
Why does this need to happen every time the selection changes? Couldn't it be done once when the isolation mode is enabled?
Contributor
Author
There was a problem hiding this comment.
Tried that. Doesn't work for some reason.
Member
|
nice! @aparajit-pratap would you also mind adding an image comparison test for this so it does not regress again? I added a few for the mesh mesh case in the last pr. |
mjkkirschner
approved these changes
Oct 6, 2020
This file contains hidden or 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
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.
Purpose
https://jira.autodesk.com/browse/DYN-3130
This attempts to fix a regression with Isolate Selected Geometry feature where point-line geometry when selected does not appear when hidden by mesh geometry (solids and surfaces). The reason for this is that the geometry needs to be reordered so that selected geometries will have higher precedence and rendered closer to the camera compared to unselected geometries.
Caveat: This comes with some performance penalty when rendering selected geometry in isolated mode.

Declarations
Check these if you believe they are true
*.resxfilesFYIs
(FILL ME IN, Optional) Names of anyone else you wish to be notified of