News:

Please remember to do a search before you ask a question!

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Dimension text not rounding properly

Started by jamac, March 04, 2015, 10:29:07 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

jamac

I have several objects which all measure in width 3.0625000000".  When I place a dimension on that width - rounding the number to 3 decimal places - usually I get 3.063" which is correct, but sometimes I get 3.062", which of course is mathematically wrong.  Now, I know its only 1/1000 which is just fine in this particular case, but its wrong and makes your work look sloppy to customers, especially when the same dimension shows up repeatedly on the same drawing.  I thought computers were excellent at rounding numbers?  Or is the problem just TurboCAD?
TurboCAD Pro Platinum V24.0 Build 62.2, 64-bit
Threadripper 1900X, 128GB, GeForce RTX-2080
Windows 10 Home
CAD operator since 1985
TurboCAD user since v8

Ken Doyle

#1
I suggest you round to four decimal places.

http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

Read about rounding errors on computers.

http://en.wikipedia.org/wiki/Floating_point

Also more information on rounding in wikipedia.

It also depends on your processor on your computer. Intel used to be better than AMD. Not sure about the present.

Alvin Gregorio

Quote from: jamac on March 04, 2015, 10:29:07 AM

I have several objects which all measure in width 3.0625000000".  When I place a dimension on that width - rounding the number to 3 decimal places - usually I get 3.063" which is correct, but sometimes I get 3.062", which of course is mathematically wrong.  Now, I know its only 1/1000 which is just fine in this particular case, but its wrong and makes your work look sloppy to customers, especially when the same dimension shows up repeatedly on the same drawing.  I thought computers were excellent at rounding numbers?  Or is the problem just TurboCAD?

[I was almost finished composing the following-- then went out to lunch, before Ken had posted his edits.  But I thought I'd post this anyway. -Alvin]

Is "Precision" set the same for both the example Dimensions you referenced jamac?  Not just "Round Off", but "Precision".
Probably "yes", but I just thought I'd throw that possibility out there.

Just doesn't make sense to me that a computer would go one way on the round-off one time, then another the other time.

~Alvin
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

jamac

Under Space Units, Precision is set to 10.  When I measure from vector to vector, I am given "3.0625" - the extra zeros are truncated, therefore, in binary, the computer is definitely storing these vectors just as they're read with a 10 decimal place equivalent of "3.0625000000"; the translation between binary and base-10 is evidently clean.  No numbers are 'floating' here (between these particular vectors).  Therefore the '...25' part should be rounded up to '...3'.

QuoteI suggest you round to four decimal places.

Again, the prime interest here is that it looks sloppy to the customer.  If one dimension reads "3.062" and another reads "3.063" this can create doubt as to the accuracy of my work.  If I go with four decimal places, I'm doing the same thing.
TurboCAD Pro Platinum V24.0 Build 62.2, 64-bit
Threadripper 1900X, 128GB, GeForce RTX-2080
Windows 10 Home
CAD operator since 1985
TurboCAD user since v8

Alvin Gregorio

Quote from: jamac on March 04, 2015, 02:50:55 PM
Under Space Units, Precision is set to 10.  When I measure from vector to vector, I am given "3.0625" - the extra zeros are truncated, therefore, in binary, the computer is definitely storing these vectors just as they're read with a 10 decimal place equivalent of "3.0625000000"; the translation between binary and base-10 is evidently clean.  No numbers are 'floating' here (between these particular vectors).  Therefore the '...25' part should be rounded up to '...3'.

QuoteI suggest you round to four decimal places.

Again, the prime interest here is that it looks sloppy to the customer.  If one dimension reads "3.062" and another reads "3.063" this can create doubt as to the accuracy of my work.  If I go with four decimal places, I'm doing the same thing.

A workaround! (I know you love workarounds, James).  When you don't get the dimension value rounded-off/displayed as you wish James, maybe just go into it's Properties/General/Attribute field or Selection Info Palette/General/Info field, and over-write with the value you wish.  Just make sure you over-write the < and the >.  You can always undo this any later time by typing in <>, over-writing everything.
    That's a dreaded workaround, I know.  But at least it will look consistent, accurate, and professional to the client.

___________
I'm not educated enough nor computer-savvy enough to follow the first part of your post James-- "extra zeros"... "binary"... "base-10", etc.
But it certainly would seem that the same computer, within the same program, measuring objects of the same distance, using the same CAD-tool with the same settings, would display a dimension value the same.  That it would be consistent.

~Alvin
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

DonCW

#5
Quote from: jamac on March 04, 2015, 10:29:07 AM
I have several objects which all measure in width 3.0625000000".  When I place a dimension on that width - rounding the number to 3 decimal places - usually I get 3.063" which is correct, but sometimes I get 3.062", which of course is mathematically wrong.  Now, I know its only 1/1000 which is just fine in this particular case, but its wrong and makes your work look sloppy to customers, especially when the same dimension shows up repeatedly on the same drawing.  I thought computers were excellent at rounding numbers?  Or is the problem just TurboCAD?

Open dimension properties and change the setting to what's shown in the attached. It'll cure the dimension differences.
DonCW
2020 Platinum
2018 Platinum
2017 Pro with Light Works Plug in



Windows 10
There's so much to learn and not much time left to learn it.

jamac

Don, your recommended settings did not work - they gave me "3.0625000000".  However, I hadn't noticed the Round Off parameter before (not really sure why its there.)  So, I set the precision to "3" and the Round Off to "0.0001" and that worked.  I've got "3.063" just like the other dimensions have - like it should be.  I guess you can't rely on just Precision.

Alvin, thanks for the workaround, which I was already familiar with.  And you're right, I don't like workarounds, especially ones that compromise accuracy in things that can change.  I'm glad Don had his suggestion.
TurboCAD Pro Platinum V24.0 Build 62.2, 64-bit
Threadripper 1900X, 128GB, GeForce RTX-2080
Windows 10 Home
CAD operator since 1985
TurboCAD user since v8