-
Notifications
You must be signed in to change notification settings - Fork 511
Z order for selecting coplanar entities is inverted #521
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
Comments
Related to #161. I recall there was a lot of trouble getting selection logic to work correctly. |
Need to integrate "Selection by order" where I implemented to following:
This allows to select any entity even if them co-planar. |
I can not find it. Or do you mean in NoteCAD? |
This one |
IIRC "selection by order" solved this problem but introduced new ones. |
I also get frustrated at times when trying to drag a point and it grabs planes from g001-references and won't move. Perhaps those should only be selected if it's unambiguous? |
We'll get the exact same problem in other groups if we special-case references. I think this can and should be solved properly instead. |
Problem with coplanar entities can't be solved, so selection by order is common workaround in other software. |
Right, we can do that, and we can also make it possible to disambiguate the selection somehow (like what KiCAD does). |
I think it should prefer entities in the current group, Then entities (points) that lie in the current workplane, and then others. |
Reopened. The recent fix is not very robust. Better but still not great. |
I really wanted to get this fixed for 3.0 and gave it a try. However, if I read the code correctly and this definition:
I believe distance is the lateral distance from the mouse pointer to an entity, while zIndex is a terrible name because it's based on the style of the entity which differentiates points, curves, and constraints. There is nothing that corresponds to the depth into the screen so proper Z-ordering is not just broken, it doesn't exist. This is great for 2D sketches but obviously has some issues in 3D. I'm thinking a correct fix is going to add a "depth" member to the Hover, a bit of new calculations in all the picking code to provide the depth value for each entity, and then finally changes to ChooseFromHoverToSelect() and ChooseFromHoverToDrag(). And lastly verify that grid snapping still works! |
Works fine now. And I have not noticed any regressions. |
System information
3.0~690f87c
Expected behavior
If try to select one of co-planar entities, SolveSpace should prioritize to select nearest entity (according display Z axis).
Actual behavior
When tried to select one of co-planar entities, SolveSpace selected remote in space entity (according display Z axis), instead of selecting nearest entity.
Additional information
For bugs, please attach a savefile that shows the problematic behavior.
You can attach
.slvs
files by archiving them into a.zip
first.The text was updated successfully, but these errors were encountered: