[Feature Suggestion] Improve rectangular balloons for GD&T

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
ToniTen
Posts: 242
Joined: Fri Sep 04, 2020 10:11 am

[Feature Suggestion] Improve rectangular balloons for GD&T

Post by ToniTen »

Right now, when putting a vertical pipe | in a rectangular balloon, you create a rectangular balloon with internal separators. This is very nice and useful, yet it is lacking when it comes to making professional drawings. Techdraw rectangular balloons have the following deficiencies
  • Single line: you can't insert line breaks in the balloon, as far as I know.
  • When there is only one character in a "cell", it is not centred. This is specially relevant when putting a GD&T symbol at the start
  • Width is always based on the character width. When using GD&T symbols, it's usual to have the first cell be square, and always the same size
  • There is too much whitespace around the text. Text should be closer to the borders and to the separators
This is an example of a professional looking drawing (1)
what_I_want.png
what_I_want.png (24.51 KiB) Viewed 3359 times
This is as close as I can get in TechDraw
what_I_can_get.png
what_I_can_get.png (5.53 KiB) Viewed 3348 times
(2 balloons, one with "⌖|⌀0,05|A|B|C" as it's content, one with "⟂|0,05|A" and Line Visible set to "false")

Right now, I export my drawings as SVG and fix the balloons in Inkscape, but this is certainly not ideal

Here's my proposal:
  • Introduce another special character for rectangular balloons, to act as a newline character "\"
  • When there is more than 1 line and there are separators, turn the balloon into a sort of table by aligning separators across multiple lines
  • Remove the extra whitespace in such balloons, specially around separators (visible when editing the balloon on inkscape, each separator is replaced with 3 spaces)
  • Make the first "cell" fixed width when it contains only GD&T characters
  • Don't output the contents of the balloon as a single text string with spaces to put the different parts in different "cells", and instead make each part a separate text string that is centered in the cell
(This drawing was extracted from page 18 of this document)
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [Feature Suggestion] Improve rectangular balloons for GD&T

Post by wandererfan »

ToniTen wrote: Thu May 12, 2022 11:18 am Here's my proposal:
  • Introduce another special character for rectangular balloons, to act as a newline character "\"
  • When there is more than 1 line and there are separators, turn the balloon into a sort of table by aligning separators across multiple lines
  • Remove the extra whitespace in such balloons, specially around separators (visible when editing the balloon on inkscape, each separator is replaced with 3 spaces)
  • Make the first "cell" fixed width when it contains only GD&T characters
  • Don't output the contents of the balloon as a single text string with spaces to put the different parts in different "cells", and instead make each part a separate text string that is centered in the cell
I'm not in favour of hacking balloons to better simulate Feature Control Frames. I would much rather introduce a dedicated function.
ToniTen
Posts: 242
Joined: Fri Sep 04, 2020 10:11 am

Re: [Feature Suggestion] Improve rectangular balloons for GD&T

Post by ToniTen »

wandererfan wrote: Thu May 12, 2022 1:26 pm I'm not in favour of hacking balloons to better simulate Feature Control Frames. I would much rather introduce a dedicated function.
Sure, I would love to see a dedicated function. I just thought that since currently balloons seem to mostly do the job, then maybe that was the path that had been decided for FreeCAD. To make sure, there is no other way to do this in FreeCAD right now, right?
chrisb
Veteran
Posts: 54201
Joined: Tue Mar 17, 2015 9:14 am

Re: [Feature Suggestion] Improve rectangular balloons for GD&T

Post by chrisb »

ToniTen wrote: Thu May 12, 2022 1:34 pm there is no other way to do this in FreeCAD right now, right?
Before there were balloons I used a collection of SVG symbols for circles and arrows in various directions . That seems to be easier to maintain than to rework the complete drawing in SVG on every single change.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
ToniTen
Posts: 242
Joined: Fri Sep 04, 2020 10:11 am

Re: [Feature Suggestion] Improve rectangular balloons for GD&T

Post by ToniTen »

chrisb wrote: Thu May 12, 2022 4:52 pm Before there were balloons I used a collection of SVG symbols for circles and arrows in various directions . That seems to be easier to maintain than to rework the complete drawing in SVG on every single change.
Thanks for the heads up.

I always do end up doing some touch up on Inkscape anyway, so it's less of a bother than you would think. I could, however, make a SVG symbol for control frames that I can just drop in though, it's not like what I do in Inkscape is much different (I do have some pre made frames that I just place, copy/paste the text, remove the balloon, and keep the arrow, sometimes needing to tweak the cells a little bit)
User avatar
Cuq
Posts: 145
Joined: Tue Jul 06, 2021 10:07 am

Re: [Feature Suggestion] Improve rectangular balloons for GD&T

Post by Cuq »

My solution is to use a special Font where Frame are already incorporate to the Police as well as every Gd&T special symbol .
Iso-Gps.PNG
Iso-Gps.PNG (4.11 KiB) Viewed 2556 times
I'm using the same solution for Word or Excel document.

the only issue is it's difficult to "write" the right code sequence in Freecad as we don't have a insert function . So I need to use Word to define the text with the insert Special characters Function .. Then I made a Copy/Paste of the text :
insert_Word.PNG
insert_Word.PNG (79.5 KiB) Viewed 2556 times

Would be cool To have also in the Editor an "Insert" special characters as in Word. And to have the same police in the text editor as in the Annotation / Text element

The text in the FreeCad Editor and the result in the drawing as annotation
Edit.PNG
Edit.PNG (16.97 KiB) Viewed 2529 times
Last edited by Cuq on Fri Apr 07, 2023 4:52 pm, edited 3 times in total.
User avatar
Cuq
Posts: 145
Joined: Tue Jul 06, 2021 10:07 am

Re: [Feature Suggestion] Improve rectangular balloons for GD&T

Post by Cuq »

Other limitation :
When using a Ballon the line is not connected to the symbol (there is always a small Gap) And I don't know how to remove it.
Limit.PNG
Limit.PNG (6.83 KiB) Viewed 2551 times
And with The ballon element we can define only one Line ?
User avatar
Roy_043
Veteran
Posts: 8551
Joined: Thu Dec 27, 2018 12:28 pm

Re: [Feature Suggestion] Improve rectangular balloons for GD&T

Post by Roy_043 »

Cuq wrote: Fri Apr 07, 2023 3:51 pmPolice
This is probably a mistranslation?
User avatar
Cuq
Posts: 145
Joined: Tue Jul 06, 2021 10:07 am

Re: [Feature Suggestion] Improve rectangular balloons for GD&T

Post by Cuq »

I thought Police was also acceptable for Font as in French. So yes mistranslation.
User avatar
bensay
Posts: 202
Joined: Wed Dec 22, 2021 8:14 pm
Location: Danmark
Contact:

Re: [Feature Suggestion] Improve rectangular balloons for GD&T

Post by bensay »

I propose making a child function of balloon and then reusing some of its logic. I propose that it for each "|" character should create a new rectangle and for each "<" or ">" creates triangles. The characters should be escaped "\" character in case "|", "<" or ">" should be used as text and not as geometry identifier.
Post Reply