Inside-horizontal dimensions

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Inside-horizontal dimensions

sankey
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
Reply | Threaded
Open this post in threaded view
|

Re: Inside-horizontal dimensions

gabriel
Thanks so much for this addition, great work, please don't stop, keep ir coming, more implementations, please, libreCAD needs you. 

El mié., 21 mar. 2018 9:31, sankey [via LibreCAD] <[hidden email]> escribió:
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



If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/Inside-horizontal-dimensions-tp5715827.html
To start a new topic under LibreCAD-dev, email [hidden email]
To unsubscribe from LibreCAD, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Inside-horizontal dimensions

sankey
In reply to this post by sankey
This first iteration change has now been merged into LibreCAD master (thanks lordofbikes!).  Next I may attempt to implement built-in leaders for inside-horizontal linear dimensions.  Here are a few examples of how AutoCAD implements inside-horizontal with outside arrows:

AutoCAD style built-in leader lines   AutoCAD style built-in leader lines   AutoCAD style built-in leader lines

It is not specific to AutoCAD; I have found this in several style reference guides for manual drafting too.

I don't think this style has an existing name, so I'm dubbing it "built-in leaders" for the sake of discussion.  This feature in LibreCAD should allow the designer to manually position the text, and the built-in leader will automatically follow the text.  The last line segment (adjacent to the text) should always be horizontal, and the first line segment (adjacent to the arrow) should be parallel to the existing extension line which was already there.
Reply | Threaded
Open this post in threaded view
|

Re: Inside-horizontal dimensions

dellus
Hello sankey,
it seems you are a specialist for dimensions. Maybe you could help with an issue.
In the Drawings Preferences - Dimensions settings box you can tick "Fixed length" (Extension lines), that's used for architectural drawings.
At the top of the box we have "General scale". If you want a drawing with the scale 1:100, you write "100" into there, and all the values for text, positions and arrow / tick sizes are multiplied by 100 for the screen appearance and print out. So, for example, you can set the text height as 2.5 mm, which is the standard for an ordinary dimension, and it will always be printed out 2.5 mm high on paper, like in old times when you used a 2.5 mm stencil for that.
Just that stubborn "Fixed length" doesn't comply.
Is there a good reason for this? Is it too difficult to implement? If it is within your scope could you have a look at that? The coming major release 2.2 would be a good moment to fix this.

Not a developer, just a newbies'  questions answerer on the forum,

dellus

       
Reply | Threaded
Open this post in threaded view
|

Re: Inside-horizontal dimensions

sankey
dellus wrote
Hello sankey,
it seems you are a specialist for dimensions. Maybe you could help with an issue.
Perhaps I'm a specialist in only the specific parts of the code which I studied :)

dellus wrote
In the Drawings Preferences - Dimensions settings box you can tick "Fixed length" (Extension lines), that's used for architectural drawings.
At the top of the box we have "General scale". If you want a drawing with the scale 1:100, you write "100" into there, and all the values for text, positions and arrow / tick sizes are multiplied by 100 for the screen appearance and print out. So, for example, you can set the text height as 2.5 mm, which is the standard for an ordinary dimension, and it will always be printed out 2.5 mm high on paper, like in old times when you used a 2.5 mm stencil for that.
Just that stubborn "Fixed length" doesn't comply.
Is there a good reason for this? Is it too difficult to implement? If it is within your scope could you have a look at that? The coming major release 2.2 would be a good moment to fix this.
I'm unfamiliar with architectural drafting style, but I trust you that this is a bug.  This is probably within my ability to fix, I will take a look.

I have a general question about your approach.  I've been using LibreCAD for dimensioning small and medium sized parts for mechanical systems, usually a 1:1 to 1:5 scale on US Letter paper.  When I need to dimension a 1:5 part, I scale the drawing to 20% first, then set the dimension "Length Factor" to 5 (in Drawing Preferences -> Dimensions).  Does this not work for architecture?
Reply | Threaded
Open this post in threaded view
|

Re: Inside-horizontal dimensions

dellus
Hi sankey,
thank you for considering to take a look at the issue.
The approach: In CAD you normally draw with the dimension the object really has, even if you intend a scaled down drawing. The scaling down is then done in the printing process, in LibreCAD it is in the PrintPreview mode. There you set your 1:5 scale, for example, and move your drawing around on the paper sheet, if you only want to depict a part of it, or just center it.
Maybe also a different approach is in use. I have always wondered what "Length factor" might be useful for, except for special cases. OK, if "Fixed Length" is changed to comply to "General Scale", it still can be done your way (with "General Scale" set to 1), can't it?
I'm not 100% sure this is a bug, wondered if it might be by purpose, maybe for some compatibility with AutoCAD. Some time ago I already had asked on the forum if somebody knows whether there is a good reason why it is as it is now. I got no answer.
So I advocate to fix it. LordofBikes will stop us if we are wrong.

This is how an architectural dimension looks like:



dellus
Reply | Threaded
Open this post in threaded view
|

Re: Inside-horizontal dimensions

sankey
See https://github.com/LibreCAD/LibreCAD/pull/975

Also, would you be able to do additional testing?
Reply | Threaded
Open this post in threaded view
|

Re: Inside-horizontal dimensions

LordOfBikes
Administrator
Merged!

I tested a LibreCAD DXF for reference with DWG TrueView and got same results.

Thanks to you both for battling this down

Armin
Reply | Threaded
Open this post in threaded view
|

Re: Inside-horizontal dimensions

dellus
In reply to this post by sankey
Wow, sankey, many thanks and blessings for this, you are my darling! This issue has annoyed me all the time. Could not  test yet, the nightly is not yet available.

dellus
Reply | Threaded
Open this post in threaded view
|

Re: Inside-horizontal dimensions

sankey
FWIW, I was doing some testing of LibreCAD DXF files with Autodesk Viewer (viewer.autodesk.com), and noticed that general scaling influenced fixed extension lines.  So, we can be quite sure that Autodesk wants this to be true, even if they did not write it explicitly :)