customise position of coordinate axis in bottom RH corner?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: customise position of coordinate axis in bottom RH corner?

Post by Syres »

bambuko wrote: Sat Jan 08, 2022 5:06 pm It's the position I am asking about
OK, small progress, the code that has the hard coded bottom right corner I believe is https://github.com/FreeCAD/FreeCAD/blob ... .cpp#L3332

Code: Select all

Top Right:

SbVec2s origin(view[0] - pixelarea, view[1] - pixelarea);


Bottom Right:

SbVec2s origin(view[0] - pixelarea, 0);


Bottom Left:

SbVec2s origin(0, 0);


Top Left:

SbVec2s origin(0, view[1] - pixelarea);
So now I can then attempt to make the UI changes to allow the user to change it, be patient, my brain may well be frazzled in the next couple of hours so tomorrow morning maybe more progress.

Edit: Added four corner origins
User avatar
bambuko
Veteran
Posts: 2185
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: customise position of coordinate axis in bottom RH corner?

Post by bambuko »

Syres wrote: Sat Jan 08, 2022 6:36 pm OK, small progress...
Thank you!
It would be interesting to compare it with Nav Cube code (and, no I haven't got a clue where and how to even start... :mrgreen: )
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
mario52
Veteran
Posts: 4698
Joined: Wed May 16, 2012 2:13 pm

Re: customise position of coordinate axis in bottom RH corner?

Post by mario52 »

Hi
And if we are at it: on highDPI displays the letters are illegible small. Customization would be nice.
this with relative size 30% ?
coordinateCorner00.png
coordinateCorner00.png (23.93 KiB) Viewed 1061 times
OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.26761 (Git)
Build type: Release
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: French/Mars (fr_MA)

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: customise position of coordinate axis in bottom RH corner?

Post by chrisb »

Thanks! Remains the OP request (to get back on topic).
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: customise position of coordinate axis in bottom RH corner?

Post by Syres »

bambuko wrote: Sat Jan 08, 2022 6:53 pm Thank you!
It would be interesting to compare it with Nav Cube code (and, no I haven't got a clue where and how to even start... :mrgreen: )
Firstly, I've not forgotten about this but due to the possibility of new users ending up with multiple entities over each other (Nav Cube, Frame Rate and Coordinate Axis) in the same corner I'm planning on the suggested code change being for power users only. As I'm in the middle of a serious house refurb the time required to deal with all the possibilities and prioritsation of which entity dictates the remaining positions of the others would be too much for me to commit to.

Therefore no UI change would be needed but the power user could add a parameter in Tools>Edit Parameters to set the corner with the default (no entry or 1) being bottom right, each increment of the Integer would be clockwise the next corner, i.e. bottom left = 2, top left =3 and top right = 4. Realistically I should have something to demonstrate by the weekend and if acceptable I can then submit a Pull Request for the devs to look at.

If you feel this isn't sufficient then I can only suggest you raise a new topic in Open Discussion with the title starting [Feature Request] to include the the handling of the three corner positioned entities in the UI.
User avatar
bambuko
Veteran
Posts: 2185
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: customise position of coordinate axis in bottom RH corner?

Post by bambuko »

Syres wrote: Tue Jan 11, 2022 5:48 am Firstly, I've not forgotten about this...
Thank you! I am grateful and very patient ;)
Syres wrote: Tue Jan 11, 2022 5:48 am
...I'm planning on the suggested code change being for power users only...
makes sense
Syres wrote: Tue Jan 11, 2022 5:48 am
...If you feel this isn't sufficient...
I think your proposals are very reasonable.
Let's test them when you are ready (no rush :) )
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: customise position of coordinate axis in bottom RH corner?

Post by Syres »

bambuko wrote: Tue Jan 11, 2022 10:17 am Let's test them when you are ready (no rush :) )
The branch is ready for testing https://github.com/FreeCAD/FreeCAD/comp ... 6:patch-37

I've tested it using:

OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.20.27077 (Git)
Build type: Release
Branch: master
Hash: 94e2ce44b45f81e8242d689a8b5448a5863f01a0
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)


At the very least a Windows user who self compiles really could do to test it before I submit a PR.
User avatar
bambuko
Veteran
Posts: 2185
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: customise position of coordinate axis in bottom RH corner?

Post by bambuko »

Syres wrote: Sat Jan 15, 2022 4:30 pm The branch is ready for testing...
Thank you!
Not having done anything like this before, how do I, please, test it on my Linux machine?
(sorry if I disappoint :oops: but there ate quite large gaps in my education...)
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
Syres
Veteran
Posts: 2902
Joined: Thu Aug 09, 2018 11:14 am

Re: customise position of coordinate axis in bottom RH corner?

Post by Syres »

bambuko wrote: Sun Jan 16, 2022 11:54 am Not having done anything like this before, how do I, please, test it on my Linux machine?
(sorry if I disappoint :oops: but there ate quite large gaps in my education...)
Well, I'll be honest I'm pretty short of time (getting my lounge habitable for the first time in 14 months) to document the whole compiling a branch procedure but you could start by trying to compile FreeCAD by having a thorough read of https://wiki.freecadweb.org/Compile_on_Linux

Your main first step is to make sure you have all the dependencies installed otherwise you'll create much frustration for yourself and those helping!!
User avatar
bambuko
Veteran
Posts: 2185
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: customise position of coordinate axis in bottom RH corner?

Post by bambuko »

Syres wrote: Sun Jan 16, 2022 12:13 pm ...pretty short of time (getting my lounge habitable for the first time in 14 months) to document the whole compiling a branch procedure..
never expected anything so extreme :lol:
grateful for a pointer, link and advice!
let's see if my old grey cell are up to that kind of mental exertion :mrgreen:
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
Post Reply