Nadro/adhoc/enter sketch mode bug fix #4529
Merged
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.
closes #4524
Bug
2024-11-20.14-41-43.mp4
When you click in a specific timing window you can brick the ray casting into the threejs scene.
Josh reported this bug.
Root cause
The three.js intersection plane and draft point groups were not being properly created. This means that the raycasting code on the plane to pick the points would return an empty array and say nothing was intersected.
Issues
createIntersectionPlane
is being added and removed in several locations when it does not need to bedraftPointGroups
were being appended to over time and not properly removedLine tool
twice when going into the mode due to a proxy stateFixes
draftPointGroups
are tracked within the class to be added to an array then cleared when_teardownsketch
is called. They should not be infinitely appended to the arrayFuture issues
I can still recreate the issue but what is happening is the system appears to buffer a bunch of clicks then render them all at once then goes back to normal.
I can attempt to fix this in another PR because they are two separate issues. The original bug prevented you from clicking points. This new bug is a delay in the rendering of the mouse clicks.