Improved radius drawing

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
tpavlicek
Posts: 60
Joined: Sun Jan 07, 2018 2:15 am

Improved radius drawing

Post by tpavlicek »

Hi to all!

Recently I have found out the radiuses are not displayed quite correcly in the .019 dev version. Here's a screenshot taken from the version built from master:
radius_current.png
radius_current.png (33.12 KiB) Viewed 2115 times

The outer placements seem to be ok, but the the inner placements for arcs seem to be broken, lines are often crossing the value or at least is not quite evident, to what line the dimensional value belongs.

Therefore I decided to fix these issues and give the user more options, how to specify the radius dimension look. Here's a similar screenshot with an overview of possible proposal options:
radius_proposed.png
radius_proposed.png (50.51 KiB) Viewed 2115 times
The summary of changes:

1) The implementation better follows the standard ISO 129-1 Technical product documentation (TPD) -- Presentation of dimensions and tolerances -- Part 1: General principles. Text dimensional values titlting fully corresponds to the standard Figure 23 (clockface-like text labels placement).

2) A new dimension property "Tilt Text" has been introduced to either rotate the text and draw the dimension as just leader line without the reference line ("true" value) or to keep the text horizontal and draw the dimension as a combination of a leader line and a reference line ("false" value). Here the naming convention stems from the 129-1 standard.

3) A new dimension property "Extend To Center" has been introduced to specify, whether the leader line shall be extended to the center. Sometimes this is desirable, sometimes not. Please see right upper corner (or circle in the center) of the proposal image for better understanding, how it works. The outer dimensions have set it to "true" while the inner ones to "false".

Here goes the pull request: https://github.com/FreeCAD/FreeCAD/pull/2407

I hope You will like these changes :-)


Kind regards,

Tomas
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Improved radius drawing

Post by wandererfan »

tpavlicek wrote: Fri Aug 09, 2019 12:58 pm
Great, Tomas, thank you.
1) The implementation better follows the standard ISO 129-1 Technical product documentation (TPD) -- Presentation of dimensions and tolerances -- Part 1: General principles. Text dimensional values titlting fully corresponds to the standard Figure 23 (clockface-like text labels placement).

2) A new dimension property "Tilt Text" has been introduced to either rotate the text and draw the dimension as just leader line without the reference line ("true" value) or to keep the text horizontal and draw the dimension as a combination of a leader line and a reference line ("false" value). Here the naming convention stems from the 129-1 standard.
ANSI/ASME (USA) standard uses the "uniform" convention (horizontal text). Can we still draw leader + horizontal text with no reference line?
tpavlicek
Posts: 60
Joined: Sun Jan 07, 2018 2:15 am

Re: Improved radius drawing

Post by tpavlicek »

Hi Wandererfan,

I've just skimmed through the US ASME Y14.5-2009 standard and what to say? It seems the US is a world for itself - different units, different paper formats, different technical drawings ...

Honestly, with the ISO 129-1 implementation above, the ASME Y14.5 standard is clearly violated. Of course, an update to my implementation is always possible. Are there any plans for TechDraw to have a general option like "Follow Standard: ASME/ISO/...", similar to FreeCAD's general "Unit System: Metric/Imperial/..." option? That would help keep everything in better sync.

Tomas
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Improved radius drawing

Post by wandererfan »

tpavlicek wrote: Fri Aug 09, 2019 2:05 pm Are there any plans for TechDraw to have a general option like "Follow Standard: ASME/ISO/...", similar to FreeCAD's general "Unit System: Metric/Imperial/..." option?
"Plans" would be too strong a word right now. I'd like to get things to the point where a user could choose a standard and then modify settings for local conventions. But the TODO list is long.

So far it is just a few parameters (section line format is one I can think of) and some comments in the code such as "this is ISO, for ANSI do xxxxx".

I plan to look at your change over the weekend.

wf
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Improved radius drawing

Post by Jee-Bee »

As a comment on this. Basically this mean there are two options
  • Default option what the user prefer
  • option where the document in is created
When sharing a document you don't want that anything break because of different user preferences...
tpavlicek
Posts: 60
Joined: Sun Jan 07, 2018 2:15 am

Re: Improved radius drawing

Post by tpavlicek »

Hello,

sorry for a late reply, the weekend kicked in...

@Jee-Bee That's a very good point. I did not realize that, but You are right. Now the best solution seems to attach a "Standard Style" parameter to every single dimension, pre-filling it with the user preffered style only when a new one is created. Of course, then we could offer some menu option tool like "Switch to ASME/ISO style", which would go through all dimensions in the document and set their style to the requested one.

@Wandererfan Thanks for the code review and the corrections! I will try to read the ASME Y14.5 standard, find what's different from ISO 129-1 and eventually I will try to make the code more compact if I find a good way.

Kind regards,

Tomas
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Improved radius drawing

Post by wandererfan »

Jee-Bee wrote: Sat Aug 10, 2019 3:24 pm When sharing a document you don't want that anything break because of different user preferences...
In this case, it won't break, but the drawing it might look slightly different. A Dimension is still a Dimension.

In any case, if two users are sharing drawings, I would expect they would be using the same style.
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Improved radius drawing

Post by wandererfan »

tpavlicek wrote: Sun Aug 11, 2019 7:36 am I did not realize that, but You are right. Now the best solution seems to attach a "Standard Style" parameter to every single dimension, pre-filling it with the user preffered style only when a new one is created. Of course, then we could offer some menu option tool like "Switch to ASME/ISO style", which would go through all dimensions in the document and set their style to the requested one.
If you change the style preference and recompute the drawing, all the dimensions will be redrawn with the new preference.
We'd only need a style property on the individual dimensions if some were going to be ISO and others on the page were going to be ASME.
@Wandererfan Thanks for the code review and the corrections! I will try to read the ASME Y14.5 standard, find what's different from ISO 129-1 and eventually I will try to make the code more compact if I find a good way.
That would be awesome!
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Improved radius drawing

Post by Jee-Bee »

wandererfan wrote: Mon Aug 12, 2019 1:37 pm In this case, it won't break, but the drawing it might look slightly different. A Dimension is still a Dimension.

In any case, if two users are sharing drawings, I would expect they would be using the same style.
I don't think this is a valid assumption. Why couldn't i share my model with somebody in UK, US or ...?
The hole point is that it slightly change. the problem is i don't want it to change. a drawing should stay as created. Specially with drawings i think this is an issue
User avatar
wandererfan
Veteran
Posts: 6268
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Improved radius drawing

Post by wandererfan »

Jee-Bee wrote: Mon Aug 12, 2019 2:40 pm The hole point is that it slightly change. the problem is i don't want it to change. a drawing should stay as created. Specially with drawings i think this is an issue
Philosophically I think I agree, but then it is a much bigger issue than just radius dimensions. To ensure the reader sees the same thing as the author, all of the author's preferences (colors, section line style, hidden line style, fonts etc) should be included in the FCStd file.

Big job.
Post Reply