Rounding of values

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Rounding of values

dxli
Just tested. Rounding is good with the master branch:

3.1771
can be rounded as:

3
3.2
3.18
3.177
3.1771

for 3.1651:
3
3.2
3.17
3.165
3.1651

Allan.W.Macdonald wrote
I notice that, when a value to be rounded is 5, LibreCAD rounds down, not up.  For example, if the drawing precision is 0.00 and an entity such as a straight line is 30.165, when dimensioning the line, LibreCAD draws 30.16 instead of 30.17.

What is the standard drafting rule for rounding, up, down or other?  What are LibreCAD's rules?  Can the rounding rules be adjusted?
Reply | Threaded
Open this post in threaded view
|

Re: Rounding of values

Allan.W.Macdonald
In reply to this post by ravas
Yay!  I can build from source!

Thanks ravas for pointing me in the right direction.

Here is why I ended up with mixed versions: When I first looked at the get involved page on librecad.org, it suggested I download the Qt Creator so I went there, downloaded and ran the Qt5 installer.

However, I didn't like the IDE that much and I thought it would be better to install the source in the proper way.  When I tried the instructions here: http://librecad.org/cms/home/from-source/linux.html, that's when everything went south!

Now that I've gone through all this malarkey, I can actually figure out what I can offer about the original thread subject! I will be back later.

Cheers,
Allan
Reply | Threaded
Open this post in threaded view
|

Re: Rounding of values

Allan.W.Macdonald
In reply to this post by dxli
Hi dxli,

I still see a problem.

1. Create a new drawing.

2. Set, in drawing preferences, dimension precision to 0.000.

3. Draw a rectangle:

  First point = 0,0
  Second point = 30.165, 30.165

4. Add a horizontal dimension to the top edge of the rectangle (snap to intersections for the dimension extension lines then add snap to grid to place text).  Note that the top edge dimension = 30.165.

5. Now set, in drawing preferences, dimension precision to 0.00.

6. Note that the top edge dimension is now = 30.16.
Reply | Threaded
Open this post in threaded view
|

Re: Rounding of values

ravas
In reply to this post by Allan.W.Macdonald
I'm really happy that you succeeded!

As you already know... the website needs to be updated,
or become a portal to wiki articles (my preference).

I hope you will contribute to the project by writing down any useful information from your experience
here: https://github.com/LibreCAD/LibreCAD/wiki/Build-from-source
All you need to do is create a GitHub account.
That also allows you to create issues and comment on them.
12