Dimension drawing standardization completed

Discussions about the development of the TechDraw workbench
tpavlicek
Posts: 27
Joined: Sun Jan 07, 2018 2:15 am

Dimension drawing standardization completed

Postby tpavlicek » Mon Sep 23, 2019 12:20 pm

Hello,

it took me longer and it was more difficult than I expected, but finally I have created a pull request

https://github.com/FreeCAD/FreeCAD/pull/2552

completely remaking the drawing of the dimensions. What are the highlights and what it gives you:

  1. Full support of ISO 129-1 and ASME Y14.5M standards
    Any drawn dimension is fully compliant with one of the standards. No hacks or compromises.
     
  2. Four standard styles to choose from
    You can render given dimension using 4 main styles from the Dimension View's Standard And Style property
    • ISO Oriented - the dimensional values are rotated to respect the dimensional line slope
    • ISO Referencing - the dimensional value stays always horizontal with reference line below the value joining the dimension line
    • ASME Inlined - the (always horizontal) dimensional value is inserted in a gap in the dimension line
    • ASME Referencing - the dimensional value is connected via a short reference line starting at a value side's vertical center
  3. A pack of options to specifying the extent to which the dimension is rendered
    Sometimes you have enough space, sometimes not. Rendering Extent property of Dimension View comes to rescue. From "None" value leaving the bare dimensional value with no lines or arrows whatsoever, over "Normal" (default) setting reserved for the most common rendering, up to "Expanded" representation for (small) diameters in a distance-like way.
     
  4. Ability to mark a theoretically exact (basic) dimension
    Both ISO and ASME standards mark a theoretically exact dimensions (or basic dimensions in ASME's jargon) by putting it into a frame. Dimension Data's Theoretical Exact property says if the dimension is such a one, framing it during drawing accordingly.
     
  5. A way to draw reflex angles and display negative distances
    The Dimension Data's Inverted property let's you indicate, that the value displayed shall be the "complement" one. This means 360° - X for angles which allows angles > 180° to be displayed properly, or -X for length values which need negative offsets or coordinates in running dimensioning.
     
  6. Automatic arrowheads flipping
    In case the dimensional value rectangle (or point where leader line joins the dimensional line) sticks out of the dimensional line, the arrows are automatically flipped. If this is not what you want, change Dimension View's Flip Arrowheads property to meet your expectations.
     
  7. Automatic reference line placement
    When drawing a dimension according to the "referencing" standard styles, the value side connecting to the reference line is selected automatically. The first rule is to avoid striking the dimensional value. Then more obtuse angles at the leader line - reference line joint are preferred. Of least importance is the criterium to place the label outside the area created by dimensional line and extension lines. For now this behavior can not be affected by the user.

For a quick preview and presentation of the 4 basic Standard And Style differences, please see the picture below:
DimensioningSample.png
DimensioningSample.png (123.92 KiB) Viewed 1294 times

I hope you will like the proposed reimplemetation. If it it will be merged in the master branch, for sure I am ready to update the documentation Wiki pages and of course to fix the possible bugs or to add new features.

Kind regards,

Tomas
Last edited by tpavlicek on Mon Sep 23, 2019 10:15 pm, edited 2 times in total.
Syres
Posts: 467
Joined: Thu Aug 09, 2018 11:14 am

Re: Dimension drawing standardization completed

Postby Syres » Mon Sep 23, 2019 12:50 pm

Excellent contribution, thanks for the efforts, look forward to being able to use it.
User avatar
wandererfan
Posts: 3664
Joined: Tue Nov 06, 2012 5:42 pm

Re: Dimension drawing standardization completed

Postby wandererfan » Mon Sep 23, 2019 1:22 pm

tpavlicek wrote:
Mon Sep 23, 2019 12:20 pm
it took me longer and it was more difficult than I expected, ...
Wow! Looks fantastic. Can't wait to try it out.
aapo
Posts: 102
Joined: Mon Oct 29, 2018 6:41 pm

Re: Dimension drawing standardization completed

Postby aapo » Mon Sep 23, 2019 3:19 pm

Great! :D
chrisb
Posts: 22396
Joined: Tue Mar 17, 2015 9:14 am

Re: Dimension drawing standardization completed

Postby chrisb » Mon Sep 23, 2019 6:04 pm

This is really great, many thanks! Making FreeCAD conformant to standards is a big step towards professional usability.
triplus
Posts: 9278
Joined: Mon Dec 12, 2011 4:45 pm

Re: Dimension drawing standardization completed

Postby triplus » Wed Sep 25, 2019 4:10 pm

Thanks!
User avatar
wandererfan
Posts: 3664
Joined: Tue Nov 06, 2012 5:42 pm

Re: Dimension drawing standardization completed

Postby wandererfan » Wed Sep 25, 2019 4:33 pm

Merged into master - git commit b75398d763

Thank you Tomas!
PAT64
Posts: 67
Joined: Wed May 25, 2016 2:53 pm
Location: Pyrénées Atlantiques

Re: Dimension drawing standardization completed

Postby PAT64 » Thu Sep 26, 2019 3:03 am

Good morning all
I would not want to break the mood but with the version 0.19-18293 under Windows 10, although when changing in the preferences style of representation of the ribs I do not see any change thereof.I forget can be something to do, a problem of "merger" in the program, it will be resolved I do not doubt and all my congratulations and thanks to the author of this modification.
Good day to all
tpavlicek
Posts: 27
Joined: Sun Jan 07, 2018 2:15 am

Re: Dimension drawing standardization completed

Postby tpavlicek » Thu Sep 26, 2019 9:25 am

Hi all,

I am glad you like the update, any bug reports or enhacement wishes are welcome. Now I will try to update the Wiki documentation pages to reflect the new options. Also I would like to thank to @Wanderefan for code review, valuable advice and final (non-trivial) merge. For @PAT64: the Standardization update has been merged to the master branch just yesterday, so it is not present in v0.19.18293 preview release. You must either compile the source yourself, or wait until next dev build is released...

Kind regards,

Tomas
User avatar
wandererfan
Posts: 3664
Joined: Tue Nov 06, 2012 5:42 pm

Re: Dimension drawing standardization completed

Postby wandererfan » Thu Sep 26, 2019 11:57 am

PAT64 wrote:
Thu Sep 26, 2019 3:03 am
I would not want to break the mood but with the version 0.19-18293 under Windows 10, although when changing in the preferences style of representation of the ribs I do not see any change thereof.
As Tomas mentioned, the change is not in the "daily" builds yet.

Tomas can confirm, but I believe the preferences are for the initial values only. If you change your mind after creation you will have to change the property on the individual dimension.