[Solved]Annotation label in mainwindow

A forum for research and development of the user interface of FreeCAD
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
mea08kw
Posts: 82
Joined: Sun Oct 09, 2022 6:22 am

[Solved]Annotation label in mainwindow

Post by mea08kw »

Hi All,

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
I created an annotation label in mainwindow, see attached.

When I use navigation cube for rotation or zoom in/out by scrolling the mid button of my mouse, the label moves accordingly.

The movement of label makes sense as I changed the view.

The goal I'm trying to reach is that the label is always fixed in mainwindow no matter what actions I made.

Looking forward to hearing some constructive suggestions.

Many thanks.

Best Regards,

Mea08kw
Attachments
1.png
1.png (14.35 KiB) Viewed 1413 times
Last edited by mea08kw on Mon Feb 06, 2023 1:06 am, edited 1 time in total.
User avatar
onekk
Veteran
Posts: 6094
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Annotation label in mainwindow

Post by onekk »

mea08kw wrote: Wed Feb 01, 2023 6:21 am ...
The goal I'm trying to reach is that the label is always fixed in mainwindow no matter what actions I made.
...
Hello, as FreeCAD has many WB the context is not very clear as the image will not help too much to see what entity you have created.

We are speaking about "Draft Annotations" ?

If we are speking of those labels made using Text under Annotations in Draft WB when you create them you specify an exact "Font Size" in mm, so it is working as intended.

A possible solution if you intend to have some visual marks that indicate something in the model could maybe have a control to tune an ipotetical "relative size" label in dimensions, so when you can zoom in and out, you could tune the dimensions to not "crowd too much" the window, maybe with some "+ and -" buttons somewhere.

Or to place labels on a side of the 3d windows and have them fixed here, maybe on between the NaviCube and the "small axis indicator" and keep fixed here with arrows that resize but keep indicating relevant points on the model, this could maybe useful in some assembly work, or to make some "presentation", but when modelling I don't think they are very useful, so probably some wort of "presentation WB" or in some "Assembly WB" where the purpose of showing things is more relevant than the modelling tasks, would be a appropriate place for "indicator labels".

It however heavily depends on what is the purpose of these labels, and where you want to place them.

Some discussion have been done and there is some general consense about the actual way could be improved, but now I don't remember discussion links. (sorry If I don't write down links, my memory is not helping)

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
mea08kw
Posts: 82
Joined: Sun Oct 09, 2022 6:22 am

Re: Annotation label in mainwindow

Post by mea08kw »

It's been solved by getting the idea from Pie Menu workbench.
User avatar
onekk
Veteran
Posts: 6094
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Annotation label in mainwindow

Post by onekk »

mea08kw wrote: Mon Feb 06, 2023 1:05 am It's been solved by getting the idea from Pie Menu workbench.
Hello, happy to ear that your problem is solved

Please mark as [Solved] prepending the text editing first post title.

But having an idea of what the problem was, and what type of annotations you were speaking about and how you solved the problem will be maybe an help for a future user with similar problem.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
mea08kw
Posts: 82
Joined: Sun Oct 09, 2022 6:22 am

Re: Annotation label in mainwindow

Post by mea08kw »

onekk wrote: Mon Feb 06, 2023 8:40 am
mea08kw wrote: Mon Feb 06, 2023 1:05 am It's been solved by getting the idea from Pie Menu workbench.
But having an idea of what the problem was, and what type of annotations you were speaking about and how you solved the problem will be maybe an help for a future user with similar problem.
If you look into Pie Menu workbench, those sliced pie buttons appeared in mainwindow are what I expected.
User avatar
onekk
Veteran
Posts: 6094
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Annotation label in mainwindow

Post by onekk »

mea08kw wrote: Wed Feb 08, 2023 6:39 am ...
If you look into Pie Menu workbench, those sliced pie buttons appeared in mainwindow are what I expected.
But a button is not an annotation, as usual, bad questions, usually result in incorrect answers.

Kind Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
mea08kw
Posts: 82
Joined: Sun Oct 09, 2022 6:22 am

Re: Annotation label in mainwindow

Post by mea08kw »

onekk wrote: Wed Feb 08, 2023 8:52 am
mea08kw wrote: Wed Feb 08, 2023 6:39 am ...
If you look into Pie Menu workbench, those sliced pie buttons appeared in mainwindow are what I expected.
But a button is not an annotation, as usual, bad questions, usually result in incorrect answers.

Kind Regards

Carlo D.
Sorry for the confusion. True, technically button and annotation are two different objects. However, if we make use of button flexibly, it will have the same feature as annotation. Hope this clarifies the confusion I made by accident.
User avatar
onekk
Veteran
Posts: 6094
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: [Solved]Annotation label in mainwindow

Post by onekk »

I can't guess the scope as annotations are managed as 3d view objects, while button are managed in other way.

An annotation has a relation to a 3d object and usually have a mean in a model, a button is an object that is made to perform actions and is usually independent from the model.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply