[Feature Request] Surface finish symbols [SOLVED]

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
user1234
Veteran
Posts: 3328
Joined: Mon Jul 11, 2016 5:08 pm

Re: [Feature Request] Surface finish symbols [SOLVED]

Post by user1234 »

wandererfan wrote: Thu Jul 28, 2022 11:49 pm If nobody beats me to it, I'll do this when I get a minute.
Let me that do for training.

Greetings
user1234
User avatar
tobiasfalk
Posts: 93
Joined: Fri Feb 05, 2021 2:35 pm

Re: [Feature Request] Surface finish symbols [SOLVED]

Post by tobiasfalk »

When editing an exported PDF, is the text from an annotation "markable"? (I don't remember the last time I tried to modify a PDF)
It is not about editing the PDF but and "marking" could have bin misunderstood. Why I think it would be relay cool to have the text as Text in the PDF and not as Lines, is so that it is possible to search for the text and to copy out of it. These are some quality of life improvements that are sometimes just relay nice to have.
From a quick look at the code, all the text seems to be created the same way. We probably need to hear from @edi or maybe @bensay.
I try ed again and I was mistaken I selected some other text and not the RA number sorry for this confusion
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [Feature Request] Surface finish symbols [SOLVED]

Post by wandererfan »

user1234 wrote: Fri Jul 29, 2022 12:06 am Let me that do for training.
All yours. Let me know if you get stuck.
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [Feature Request] Surface finish symbols [SOLVED]

Post by wandererfan »

tobiasfalk wrote: Fri Jul 29, 2022 12:13 am It is not about editing the PDF but and "marking" could have bin misunderstood. Why I think it would be relay cool to have the text as Text in the PDF and not as Lines, is so that it is possible to search for the text and to copy out of it. These are some quality of life improvements that are sometimes just relay nice to have.
The reason I asked was to find out if regular text comes out as "text" in the Pdf and not as an image. If regular text behaves nicely, it might be possible to substitute regular text for text in Svg (like templates) before printing.
user1234
Veteran
Posts: 3328
Joined: Mon Jul 11, 2016 5:08 pm

Re: [Feature Request] Surface finish symbols [SOLVED]

Post by user1234 »

wandererfan wrote: Fri Jul 29, 2022 2:31 pm Let me know if you get stuck.
Already works, but i want to edit more stuff. For example the font and the preset Ra values. The values can be also Rz or complete different value or a letter like X, so it should be empty. Also it should be under the view and with parameter and editable.

You surly will hear my cry.

Greetings
user1234
User avatar
tobiasfalk
Posts: 93
Joined: Fri Feb 05, 2021 2:35 pm

Re: [Feature Request] Surface finish symbols [SOLVED]

Post by tobiasfalk »

wandererfan wrote: Fri Jul 29, 2022 2:34 pm
tobiasfalk wrote: Fri Jul 29, 2022 12:13 am It is not about editing the PDF but and "marking" could have bin misunderstood. Why I think it would be relay cool to have the text as Text in the PDF and not as Lines, is so that it is possible to search for the text and to copy out of it. These are some quality of life improvements that are sometimes just relay nice to have.
The reason I asked was to find out if regular text comes out as "text" in the Pdf and not as an image. If regular text behaves nicely, it might be possible to substitute regular text for text in Svg (like templates) before printing.
This Sounds like a nice Idea that could work, but then Magazin you would ned to draw the text after opening the template and ned to remember to coordinates where the text should be.
And as a smal thought, I Think this thread is the wron Placebo to discus this so I Think the thread whre I ask absolut Templates as FreeCAD object is a better Placebo to Talk absolut this(https://forum.freecadweb.org/viewtopic.php?f=35&t=70568)
edi
Posts: 481
Joined: Fri Jan 17, 2020 1:32 pm

Re: [Feature Request] Surface finish symbols [SOLVED]

Post by edi »

wandererfan wrote: Thu Jul 28, 2022 11:49 pm
... We probably need to hear from @edi or ....
My aim was to realize the macro SurfaceSymbols04.FCMacro in cpp-code. The macro was published and discussed earlier in this thread.

The existent solution unfortunately is far away from being perfect. IMO the main issue is, that the created TechDraw::DrawViewSymbol is a child of the page. A surface finish symbol should be a child of the selected view. The only reason for using SVG was, that the source of a DrawViewSymbol is SVG.

During development of the existing cpp-code I created the SurfaceFinishSymbol as a QPixmap. Lines and texts were created using QPainter (not SVG). I was able to connect the QPixmap to the selected view, using the algorthm shown in https://forum.freecadweb.org/viewtopic. ... 6&start=10
But I had to throw this solution: although using the antialiasing option the QPixmap became dowdy, and it was not possible to undo or delete the created object.
If somebody wants to receive the source code, please tell me.

IMO a good solution needs the creation of a new class TechDraw::DrawSurfaceFinishSymbol and a new class TechDrawGui::ViewProviderSurfaceFinishSymbol, and their integration into the workbench. This two classes could have properties, shown in the Combo View.

In the moment my understanding of the FreeCAD code is too little to realize that in a short time. Maybe some day I will understand FreeCAD enough to finish this task.
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: [Feature Request] Surface finish symbols [SOLVED]

Post by FBXL5 »

user1234 wrote: Fri Jul 29, 2022 2:58 pm Already works, but i want to edit more stuff. For example the font and the preset Ra values. The values can be also Rz or complete different value or a letter like X, so it should be empty.
Maybe the field could be split in two:
- One to choose Ra. Rz, or none to edit manually.
- and following a box with given values and the choice to type a value manually.

And please don't forget to change the capital A to alowercase one. It should be Ra and not RA or has it been changed recently?
edi
Posts: 481
Joined: Fri Jan 17, 2020 1:32 pm

Re: [Feature Request] Surface finish symbols [SOLVED]

Post by edi »

FBXL5 wrote: Sun Jul 31, 2022 10:49 pm Maybe the field could be split in two:
- One to choose Ra. Rz, or none to edit manually.
- and following a box with given values and the choice to type a value manually.

And please don't forget to change the capital A to alowercase one. It should be Ra and not RA or has it been changed recently?
If you switch to ASME the Ra-field of the ISO version becomes a text edit field, where you can type in everything: Ra 0.8, Rz 25, X ...

Sorry for the capital A.
User avatar
bensay
Posts: 202
Joined: Wed Dec 22, 2021 8:14 pm
Location: Danmark
Contact:

Re: [Feature Request] Surface finish symbols [SOLVED]

Post by bensay »

edi wrote: Sat Jul 30, 2022 3:35 pm If somebody wants to receive the source code, please tell me.
I won't promise anything, but i would gladly take a look at it. Also, it shouldn't be that you got Discord?
Post Reply