In preferences general select an imperial units. Go to draft workbench then bring preferences up. Select draft->snap settings. Grid spacing is always mm
Bug #1951: Draft workbench preferences snap settings does not use "units" settings
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Bug #1951: Draft workbench preferences snap settings does not use "units" settings
issue #1951: Draft workbench preferences snap settings does not use "units" settings
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: Bug #1951: Draft workbench preferences snap settings does not use "units" settings
All Draft/Arch prefs settings are in millimeters still.... Couldn't find out how to use the InputField widget in qt designer yet
Re: Bug #1951: Draft workbench preferences snap settings does not use "units" settings
Anyone know anything about this?Couldn't find out how to use the InputField widget in qt designer yet
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: Bug #1951: Draft workbench preferences snap settings does not use "units" settings
Attached screenshot above instead of linking to the tracker link of the image
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: Bug #1951: Draft workbench preferences snap settings does not use "units" settings
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: Bug #1951: Draft workbench preferences snap settings does not use "units" settings
Can give it a try in the coming week.Kunda1 wrote: ↑Sun Jan 23, 2022 1:39 am@openBrain can you take a stab at this?openBrain wrote:
issue #1951
Re: Bug #1951: Draft workbench preferences snap settings does not use "units" settings
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: Bug #1951: Draft workbench preferences snap settings does not use "units" settings
Here's the basic fix as a PR : https://github.com/FreeCAD/FreeCAD/pull/5427
However I found 2 inconveniences with Draft grid :
* If Draft is already activated as a WB, when you create a new document grid isn't displayed, even if active. You have to disable + enable it again to get it.
* When the size in the preferences is changed, it isn't took into account immediately. You have to disable + enable grid to resize.
I'll try to fix this later. PR can be merged as is if needed, I'll eventually open, a new one.
However I found 2 inconveniences with Draft grid :
* If Draft is already activated as a WB, when you create a new document grid isn't displayed, even if active. You have to disable + enable it again to get it.
* When the size in the preferences is changed, it isn't took into account immediately. You have to disable + enable grid to resize.
I'll try to fix this later. PR can be merged as is if needed, I'll eventually open, a new one.

Re: Bug #1951: Draft workbench preferences snap settings does not use "units" settings
There is no way for Draft to detect when a new document is created, unless we set up a document observer. At that time, I though this would be overkill, and preferred to have a check at the beginning of each Draft command to check and display the grid if needed. But document observers have evolved a lot, we could change our mind...
Similar problem, there is no way for Draft to know when a preference has been changed. However, C++ preferences pages can trigger some action. Maybe there is a way to create a python function for that too...
There might be another way to solve these 2 issues at once, a QTimer that shoots at, say, each second (to not weight too much on the system), that would check both things and display the grid if needed...
Thanks for the PR! Looking at it ASAP
Re: Bug #1951: Draft workbench preferences snap settings does not use "units" settings
The idea is indeed to use a DocumentObserver.yorik wrote: ↑Mon Jan 24, 2022 1:01 pm There is no way for Draft to detect when a new document is created, unless we set up a document observer. At that time, I though this would be overkill, and preferred to have a check at the beginning of each Draft command to check and display the grid if needed. But document observers have evolved a lot, we could change our mind...
Actually there is a way. You can attach a class to a parameter group whose 'onChange' function would be called when a parameter is changed inside the group.Similar problem, there is no way for Draft to know when a preference has been changed. However, C++ preferences pages can trigger some action. Maybe there is a way to create a python function for that too...

I started implemented something that you can see here : https://github.com/0penBrain/FreeCAD/co ... 12658da5df
Unfortunately I have several problems and now it would need more time that what I have ATM :
* Regarding DocumentObserver, but grid management in Draft (through the 'Snapper' tracker) is too complex (chunky ?

* Regarding parameter group 'Attach', it just doesn't work (the 'onChange' function isn't called).


If someone want to have a deeper look, feel free.
