Feature #4162 - Draft: change pointer 'Pick Radius' based on if the user is editing or selecting
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Feature #4162 - Draft: change pointer 'Pick Radius' based on if the user is editing or selecting
This thread is a discussion thread for issue #4162 - Draft Feature: change pointer 'Pick Radius' based on if the user is editing or selecting
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
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
Re: Feature #4162 - Draft: change pointer 'Pick Radius' based on if the user is editing or selecting
Great, you can assign it to me since it's concerning edit command I guess.
follow my experiments on BIM modelling for architecture design
Re: Feature #4162 - Draft: change pointer 'Pick Radius' based on if the user is editing or selecting
Done (added you as a 'Developer', congrats )
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
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
Re: Feature #4162 - Draft: change pointer 'Pick Radius' based on if the user is editing or selecting
Wow, that's a huge resposibility, hope I haven't been too hasty . Just to be sure if i got it right:
- we should create a new Parameter for "DraftEditPickRadius" (in BaseApp\Preferences\Mod\Draft) (Float);
- this line https://github.com/FreeCAD/FreeCAD/blob ... dit.py#L68 should fetch it;
- in the Draft user preferences a new entry should give the user the chance to modify it (maybe in snap and grid sheet?);
follow my experiments on BIM modelling for architecture design
Re: Feature #4162 - Draft: change pointer 'Pick Radius' based on if the user is editing or selecting
AFAICT, that makes sense.carlopav wrote: ↑Sun Oct 13, 2019 9:04 pm Wow, that's a huge resposibility, hope I haven't been too hasty . Just to be sure if i got it right:
- we should create a new Parameter for "DraftEditPickRadius" (in BaseApp\Preferences\Mod\Draft) (Float);
- this line https://github.com/FreeCAD/FreeCAD/blob ... dit.py#L68 should fetch it;
Yea, that works though not ideal. Having it's own section makes sense to me...like 'Mouse'.
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
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
Re: Feature #4162 - Draft: change pointer 'Pick Radius' based on if the user is editing or selecting
Does something like this make sense at the beginning of Draft Edit?
It works as expected: if the parameter exhist it returns != 0 and the self.pick_radius can get it. Otherwise the parameter is set.
I just find it not so elegant...
EDIT: This is the second option. perhaps it's better:
It works as expected: if the parameter exhist it returns != 0 and the self.pick_radius can get it. Otherwise the parameter is set.
Code: Select all
if FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").GetInt("DraftEditPickRadius") == 0:
FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").SetInt("DraftEditPickRadius", 20)
self.pick_radius = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft").GetInt("DraftEditPickRadius", 20)
EDIT: This is the second option. perhaps it's better:
Code: Select all
param = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft")
self.pick_radius = param.GetInt("DraftEditPickRadius", 0)
if self.pick_radius == 0:
param.SetInt("DraftEditPickRadius", 20)
self.pick_radius = 20
follow my experiments on BIM modelling for architecture design
Re: Feature #4162 - Draft: change pointer 'Pick Radius' based on if the user is editing or selecting
Yea, this does seem more sleekcarlopav wrote: ↑Wed Oct 16, 2019 9:43 pm
EDIT: This is the second option. perhaps it's better:Code: Select all
param = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Draft") self.pick_radius = param.GetInt("DraftEditPickRadius", 0) if self.pick_radius == 0: param.SetInt("DraftEditPickRadius", 20) self.pick_radius = 20
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
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
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Feature #4162 - Draft: change pointer 'Pick Radius' based on if the user is editing or selecting
BTW, pick radius can be also manipulated with
EDIT: and then I realized that advice wasn't asked for. If you already know, sorry for the noise.
Code: Select all
Gui.ActiveDocument.ActiveView.getViewer().getPickRadius()
Gui.ActiveDocument.ActiveView.getViewer().setPickRadius(15)
Re: Feature #4162 - Draft: change pointer 'Pick Radius' based on if the user is editing or selecting
That's even cooler! Thanks @DeepSOICDeepSOIC wrote: ↑Thu Oct 17, 2019 12:07 am BTW, pick radius can be also manipulated withEDIT: and then I realized that advice wasn't asked for. If you already know, sorry for the noise.Code: Select all
Gui.ActiveDocument.ActiveView.getViewer().getPickRadius() Gui.ActiveDocument.ActiveView.getViewer().setPickRadius(15)
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
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
Re: Feature #4162 - Draft: change pointer 'Pick Radius' based on if the user is editing or selecting
Here you can find the PR: https://github.com/FreeCAD/FreeCAD/pull/2642.
Hope it works since i'm not able to compile and this was the first time trying to edit the preferences UI.
Hope it works since i'm not able to compile and this was the first time trying to edit the preferences UI.
follow my experiments on BIM modelling for architecture design