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:
- 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.
- 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
- 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.
- 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.
- 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.
- 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.
- 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:
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