"Annotate" a face or an element.

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

"Annotate" a face or an element.

Post by onekk »

Hello, following this post:

https://forum.freecadweb.org/viewtopic. ... 84#p565284

How to implement this functionality, as it seems requested and present in other CAD (not necessarily a copy, but it will be handy to make some "annotations" on faces, when building things).

I've found a sub optimal solution:
annot_text.png
annot_text.png (5.14 KiB) Viewed 1892 times
with this code:
20220126-Annotations.py
(3.52 KiB) Downloaded 40 times
But is way from being optimal.

Text is made as 2D text, 3D is placed with wrong orientation, and symbol is made "by hand" but it will not follow the face orientation, so for a cube is relatively easy to guess the correct angles to make the "wire" for other things, it will be more difficult and subject to trial and errors.

I doubt if something similar could be done with a macro, selecting the face and then activate the macro, would be a viable solution.

As it is something related to annotating solids, it could be useful even when doing mechanical design, maybe placed in a "layer" name "Annotations", or even in more layers, to have "construction lines" and so on.

Principle would be the same, as what is created may be left at user discrection, maybe using some sort of "symbol library".

Probably it is not too far, but I don't have enough "vector math skills" to obtain necessary information to automate the process.

Sorry for my bad english, when trying to explain complex things, I've many difficulties, forgive me. :)

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