Edit FCCircularText

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
56jimalexander
Posts: 82
Joined: Tue Jan 19, 2021 2:44 am
Location: Texas, USA

Edit FCCircularText

Post by 56jimalexander »

Hi all,
When creating an FCCirculartext, is it possible to edit the parameters after creation?
Or is it either: know the precise values when creating, or trial and error?
If I create it as a compound, I can use the transform tool to reposition it but the text itself sits between 2 closely spaced half circles and needs to be pretty precise.
Thanks,
Jim

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)
mario52
Veteran
Posts: 4701
Joined: Wed May 16, 2012 2:13 pm

Re: Edit FCCircularText

Post by mario52 »

hi 56jimalexander
56jimalexander wrote: Mon Aug 02, 2021 12:52 am When creating an FCCirculartext, is it possible to edit the parameters after creation?
you must use : Macro_Rotate_To_Point Image

Image
56jimalexander wrote: Mon Aug 02, 2021 12:52 am know the precise values when creating, or trial and error?
yes for the moment (you have the undo/redo or delete the last creation for facilitate the re-creation)
56jimalexander wrote: Mon Aug 02, 2021 12:52 am If I create it as a compound
then not modifiable
56jimalexander wrote: Mon Aug 02, 2021 12:52 am I can use the transform tool to reposition it but the text itself sits between 2 closely spaced half circles and needs to be pretty precise
if your text is right (not inclination) tray create the line directrice select it and use the Path tab (the text follow the complete path (line, arc ...))

if you give the limits in a file I can help you

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.
56jimalexander
Posts: 82
Joined: Tue Jan 19, 2021 2:44 am
Location: Texas, USA

Re: Edit FCCircularText

Post by 56jimalexander »

Thank you for these tips!
I now realize that the text is not ordered correctly in the creation. Please see the attached parameters and resulting creation.
Jim
Attachments
FFCircularText_test.FCStd
(73.64 KiB) Downloaded 44 times
Macro_parameters.jpg
Macro_parameters.jpg (280.96 KiB) Viewed 2076 times
mario52
Veteran
Posts: 4701
Joined: Wed May 16, 2012 2:13 pm

Re: Edit FCCircularText

Post by mario52 »

hi

the circle begin right to left (depend also to begin and end angle)

you must use the reverse button

i give 83 degrees instead 90

FFCircularText_test02.FCStd
(65.1 KiB) Downloaded 78 times

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.
56jimalexander
Posts: 82
Joined: Tue Jan 19, 2021 2:44 am
Location: Texas, USA

Re: Edit FCCircularText

Post by 56jimalexander »

Hi Mario,
Yes, I am able to duplicate your output but I don't understand why it works.
Also, why 83deg rather than 90deg?
When I choose "reverse" the letters in the box change to what was I was outputting previously.
Can you give me some clarification on this please?
Thank you,
Jim
mario52
Veteran
Posts: 4701
Joined: Wed May 16, 2012 2:13 pm

Re: Edit FCCircularText

Post by mario52 »

hi
56jimalexander wrote: Mon Aug 02, 2021 8:20 pm Also, why 83deg rather than 90deg?
example with DERMATOLOGIST RECOMMENDED = 25+1 characters (internal 25+1+1 = 27)

angle = 270 - 90 = 180 to work

180 / 27 = 6.6 degrees by characters but really 26 characters then stay 6.6 degrees

result : why 83deg rather than 90deg? 90 - 6.6 round(7) = 83

why + 1 character : for not always adding one space in end word for rotation and begin 0 to 360-x degrees instead 0 to 360 (or 0 to 0)

(maybe not good idea)
56jimalexander wrote: Mon Aug 02, 2021 8:20 pm When I choose "reverse" the letters in the box change to what was I was outputting previously.
depend begin end angle, flat or stand position

make a tests, use reset button ... enjoy

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.
56jimalexander
Posts: 82
Joined: Tue Jan 19, 2021 2:44 am
Location: Texas, USA

Re: Edit FCCircularText

Post by 56jimalexander »

Thank You Mario for this excellent information.
User avatar
mw46d
Posts: 11
Joined: Wed Aug 09, 2017 7:34 am
Contact:

Re: Edit FCCircularText

Post by mw46d »

I know, this is an old thread. But it looks somewhat related to my change;-) I was not happy with the letter spacing, so I tried to hack it to take the width of the letters into account. So far, I only changed the 'flat outer' layout and probably broke the others in the process! But something similar could probably be done for all of them;-)

Screenshot_20230824_100809.png
Screenshot_20230824_100809.png (166.02 KiB) Viewed 899 times

Maybe, this helps somebody or is an inspiration for others;-)

Have fun,
-- Marco

FCCircularTextMW.FCMacro
(390.57 KiB) Downloaded 33 times
chrisb
Veteran
Posts: 54302
Joined: Tue Mar 17, 2015 9:14 am

Re: Edit FCCircularText

Post by chrisb »

@mario52, you may want to have a look?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mario52
Veteran
Posts: 4701
Joined: Wed May 16, 2012 2:13 pm

Re: Edit FCCircularText

Post by mario52 »

Hi
chrisb wrote: Thu Aug 24, 2023 9:18 pm you may want to have a look?
yes thanks
mw46d wrote: Thu Aug 24, 2023 5:26 pm I know, this is an old thread
no problem right post

good work , i have also this idea (BBox) but i didn't know how to combine angle and boundbox i have not successful and then not follow this way

i have little problem with your modification:

Code: Select all

OS: Windows 10 build 19045
Word size of FreeCAD: 64-bit

Version: 0.22.0dev.33909 (Git)

Version: 0.21.0.33682 (Git)

Version: 0.21.0.33668 +7 (Git)

Version: 0.22.0dev.33981 (Git)
FCCircularTextMW00.png
FCCircularTextMW00.png (30.49 KiB) Viewed 782 times
very well with

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit

Version: 0.20.2.29177 +426 (Git)

Version: 0.19.24267 +148 (Git)
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.
Post Reply