Click confusion - setting to set pick radius, to make selecting stuff easier

Merged, abandoned or rejected pull requests are moved here to clear the main Pull Requests forum.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Click confusion - setting to set pick radius, to make selecting stuff easier

Post by wmayer »

I had a look to see what's going on. Here are my findings:
  1. When using an SoImage normally it takes care of the pick radius. E.g. the node is used for AnnotationLabel.

    Code: Select all

    App.ActiveDocument.addObject("App::AnnotationLabel").LabelText="A short text"
    
    You then have to debug through SoImage::rayPick to see that it works.
  2. In order to let a node do further checks the class SoRayPickAction checks in "intersect" if the ray intersects the bounding box of a shape node. If not it checks again using the pick radius.
  3. As said above the SoImage takes care of the pick radius but it fails when in sketch edit mode. My gut feeling is that it fails because ViewProvider::getPointOnRay does something weird with the locally built scene graph -- it's used inside ViewProviderSketch::mouseMove. When debugging through an SoImage node is only detected when the ray goes through its bounding box and if you are a bit away from it but inside the pick radius it always fails.
The following constraints uses an SoImage node:
  • Point on curve
  • Horizontal/vertical
  • Parallel/perpendicular
  • Equality
And these constraints only use an SoDatumLabel. Here the bounding box check fails, too:
  • Lock
  • Vertical/horizontal distance
  • Length
  • Radius
  • Angle
And the symmetry constraint uses an SoImage and an SoDatumLabel. No idea why it uses the latter.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Click confusion - setting to set pick radius, to make selecting stuff easier

Post by DeepSOIC »

Thanks for your research! But the more I use sketcher with high pick radius, the more I come to a conclusion that the lack of pick radius for constraints is no big deal, and to an extent even a good thing ;)
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Click confusion - setting to set pick radius, to make selecting stuff easier

Post by wmayer »

OK, but have you observed other strange behaviour? Now that the sub-graph of the sketcher is part of the body the icons are all displaced. Make a simple sketch in v0.16 and v0.17 and compare it. For the horizontal and vertical constraints it's quite obvious. And another serious issue is that as soon as you add a symmetry constraints all other constraint symbols disappear.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Click confusion - setting to set pick radius, to make selecting stuff easier

Post by DeepSOIC »

I've seen both behaviors (the lack of displacement, and the disappearance) since the very time PartDesign Next was merged, but haven't bothered to report it :oops:
That deserves a new thread, I think.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Click confusion - setting to set pick radius, to make selecting stuff easier

Post by wmayer »

This fixes the displaced icons: git commit 5013e8927 and git commit 549236f5171 but the issue with the symmetry constraint still happens.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Click confusion - setting to set pick radius, to make selecting stuff easier

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply