Option to hide units in Sketcher

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
hokieengr
Posts: 62
Joined: Sat Dec 31, 2016 5:09 pm

Re: Option to hide units in Sketcher

Post by hokieengr »

chrisb wrote: Sat Jun 30, 2018 11:00 pm You have to consider cases where mixed dimensions are used:
I didn't even know this was possible...
User avatar
NormandC
Veteran
Posts: 18587
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Option to hide units in Sketcher

Post by NormandC »

It's automatic, it's how the default Standard set of units works. Over 10,000mm, it's automatically converted to 10m.

Same thing for small values, 0.01mm is automatically converted to 10μm.

Many people find it annoying, but that's how it is...
hokieengr
Posts: 62
Joined: Sat Dec 31, 2016 5:09 pm

Re: Option to hide units in Sketcher

Post by hokieengr »

Learn something new everyday. I'll work that in when I get there.

I started coding this up in between nap times and could use a little help with the preference architecture. I built the widget library, installed it, opened SketcherSettings.ui, and added a new Pref checkbox. After rebuilding my option is there and clickable, no issues.

I thought by using a PrefCheckbox widget that saving and restoring the state of the preference would be handled automatically but that does not seem to be the case. So that's my question: what's the proper procedure for saving, restoring, and accessing the current state of a preference?
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Option to hide units in Sketcher

Post by Jee-Bee »

I don't exactly understand. how this topic evolved. First is talked about the sketcher and it looks like implementing some stuff in Techdraw?
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Option to hide units in Sketcher

Post by chrisb »

I think that this topic is still about Sketcher. It can use some techniques which wandererfan explored for TechDraw.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
hokieengr
Posts: 62
Joined: Sat Dec 31, 2016 5:09 pm

Re: Option to hide units in Sketcher

Post by hokieengr »

chrisb wrote: Mon Jul 02, 2018 11:50 pm I think that this topic is still about Sketcher. It can use some techniques which wandererfan explored for TechDraw.
Correct. Mr. Wandererfan was just showing me an example in TechDraw where they also stripped units from the dimension string so that I could use it as a reference for the Sketcher work.

Speaking of which, I got distances working this morning:
Screenshot_2018-07-03_08-04-10.png
Screenshot_2018-07-03_08-04-10.png (40 KiB) Viewed 1336 times
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Option to hide units in Sketcher

Post by chrisb »

Looks promising. The naked "2" looks a bit lost, but it saves clutter.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
abdullah
Veteran
Posts: 4935
Joined: Sun May 04, 2014 3:16 pm
Contact:

Re: Option to hide units in Sketcher

Post by abdullah »

hokieengr wrote: Sat Jun 30, 2018 6:05 pm For Linux developers: if you use an IDE, what is it? I've always just coded in vim, emacs, etc but even a good text editor doesn't help with really understanding a project the size of Freecad. I'm hoping maybe a good IDE will help me see the forest from the trees.
I use KDevelop. It is available from the repositories of most distributions and also as AppImage (which is usually a most modern version).
hokieengr
Posts: 62
Joined: Sat Dec 31, 2016 5:09 pm

Re: Option to hide units in Sketcher

Post by hokieengr »

Quick question: how does one access the unit schema currently in use? I need this to determine unit strings and figure out what to hide and what not to hide.

Thank you!
Post Reply