Login  Register

Inside-horizontal dimensions

Posted by sankey on Mar 21, 2018; 3:31pm
URL: https://forum.librecad.org/Inside-horizontal-dimensions-tp5715827.html

I'm currently working on refactoring the code which draws dimensions, primarily to fix the appearance of "inside-horizontal" dimension text (aka.  "unidirectional", or just "horizontal").  In AutoCAD, inside-horizontal is the default dimension text style for imperial drawings, whereas "aligned" is the default for metric drawings.  LibreCAD uses aligned by default for all drawings, and for good reason: inside-horizontal is only partially implemented, and is pretty broken for linear dimensions.

This shows the basic difference between inside-horizontal and aligned styles:



Inside-horizontal mode is toggled by the DXF group code $DIMTIH (Dimension Text Inside-Horizontal), and the style is generally more palatable for viewing drawings on stationary computer monitors.  McMaster-Carr technical drawings are all rendered with inside-horizontal style dimensions, metric or not.  I'm particularly interested in it because I just really like how it looks.

There's still a fair amount of work to add full support for inside-horizontal, but I've made some decent progress so far for linear-type dimensions:

 

My changes are currently in my github fork (below).  There's a bit more work to get it reviewable, but hopefully this will become one incremental pull request in a series to add full support for inside-horizontal to LibreCAD.

https://github.com/pwnage101/LibreCAD/commits/better_horizontal_dimensions