News:

When replying to a specific statement be sure to quote the previous post.

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.

Surveyor Dimensions Improper Rounding?

Started by billbhenry@gmail.com, April 07, 2021, 01:38:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

billbhenry@gmail.com

I dimensioned an arc with a central angle of exactly 45 degrees and got the following,  <44°59'60"  R=40.00 '  L=31.42>.  Why won't TC round up to 45°00'00"?

TurboCAD 2019 Platinum 64 bit.  Version 26.0  Build 37.4

jackbat

Did you set your precision and round off to make it round off to the nearest full number?
Jack
Windows 64 bit
2020 Pro-Platinum

billbhenry@gmail.com

Thank you for your kind advice.  I did experiment with the settings you mention before consulting the forum, but did not get satisfactory results.  I will not set my rounding or precision (0 decimal places or 0.01) to force the program to only show 45° or 45°00'00".

1. I need to know if the dimensioned arc is accurate.  I am not labeling. I am dimensioning and the minutes and seconds are significant.  If I dimension this arc and get 45°00"01' I need to correct my  error rather than rounding or truncating.  If I wanted only to display 45° or 45°00'00" I can use text. 

2.  The Rounding and Precision settings only affected the linear portions of the dimension, that is the arc length and radius length.  They had no affect on the angular dimension.  When I unchecked the arc length box, then I could affect the angle rounding and precision, but still did not get the correct angle displayed.

3.  60 seconds is not a thing.  After 59 seconds comes 1 minute, not 60 seconds.  This is a TurboCAD error which should be addressed.  No matter how I have set my formatting, 60 seconds should never display.  However, I am interested in a setting or work around which causes TC to display the dimension properly.  It just won't round up the 60 seconds until I eliminate all the decimal places that I need.

I hate to point out something that I think is a bug if it is not really a bug.

jackbat

Yep, I guess my point was poorly made.  What I was trying to say was if you have your tolerance set higher than your input precision?

I created an arc with a 45 degree angle using the input box and it measured <45°00'00"> exactly.

So is it possible that when you created your angle that it was a fraction of a second off and your tolerance is set high enough to show that error.

Even if that is the case, I think it is still a bug as you are correct, you can have fractional seconds, but that is generally shown in decimal form.

Either way, When I put the angle in the text box, the measurement worked precisely.
Jack
Windows 64 bit
2020 Pro-Platinum

jackbat

So I did a test to make sure I wasn't sending you down a bad path and I was able to reproduce your results. 

These are both the same angle.  The only difference is the precision setting.

I intentionally made the angle a very small fraction off of 45 degrees and depending on your precision setting you will get an erroneous result.

Keep in mind that although I agree that TCad probably should not allow that kind of round off, it isn't technically wrong as it rounds up to the nearest second. 

Agreed, it should then round up to the minute and degree, but the setting in precision is likely not smart enough to do that.
Jack
Windows 64 bit
2020 Pro-Platinum

Alvin Gregorio

bill...--  Can you upload/attach your .tcw Drawing File, so that we can properly diagnose what the problem might be.
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)

Torfinn

#6
This is what i get with 2019 Platinum b 70.1 and Normal template as that one is in inch, i'm a metric guy.
Basically b 70.1 was for put out the commercial, but maybe they have changed something else also.

Torfinn
Edit;
I check my downloads for v 2019 and there was an b 66. something, so then there was some change before 70.1
In File and Patches or what the name is inside here, there is also a list of fix when they give out b 70.1, so maybe wort to check out.
V20, V21, 2015 > 2024  Platinum
Deluxe 2015/ 16/ 19
RedSDK enabled
Windows 10 Home Premium (20H2/ 19042.1083) 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB


William Henry

Thanks for the help.  I am not very good at this forum stuff.  I am having difficulty getting the .jpgs attached.  I experimented with the formatting again and was going to attach pics, but can't figure out how to arrange stuff. 

The angle I measured is not exactly 45° as you guessed.  My bad.  When extending the precision to 8 places I found the central angle is actually 44°59'59.28".  It should not have rounded up to 60".  So, I think that is another problem.

Further experimentation produced 45°0'0" for the same angle.  So, now I am sad that I found a setting that produces 45°0'0" when it should produce 44°59'59".  I am just hard to please.

I am going to try to attach the clips.  I can't tell how they are going to turn out.

jackbat

Rounding is a funny thing. It is basically rules based and he who writes the rules, .... well ....rules!

Here is my educated guess.  rounding minutes and seconds would be  a programming exercise using limits and arrays and so forth and prone to error if not done right.

Rounding off a decimals however is very simple in programming exercise.  This appears to follow the rules of rounding decimals.  So if you go with that theory, and you convert 44°59'59.28" to decimal, you get 44.999722 degrees which depending on your settings, will most definitely round up to 45.
Jack
Windows 64 bit
2020 Pro-Platinum

billbhenry@gmail.com

I see what you are saying.  Of course the calcs would probably be done in decimal radians and not degrees.  We still got a couple of problems.  We should never have 60' or 60" in our dimension and there is a definite rounding error.

Since I noticed that my angles were carelessly done, I went back and redid the work and got 45°0'0".  Should I report the angular rounding errors?  I really think the routine is producing errors.  I will have to check every angle for remainders and check the remainder for rounding errors before committing to a dimension.  Am I thinking straight?

Thanks for your help.

Alvin Gregorio

There is a setting in Dimension Styles-- "Angular decimal places"; I don't find that in a Dimension's Properties Units/Tolerance page, though I do see it in the Selection Info Palette.

Playing with that some produces some different results.
But no combination of that with anything for "Precision for primary unit" and "Round off for primary dimension" produces the required rounding down of 44°59'59.28" to 44°59'59", for me.

It seems like a programming error.
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)

jackbat

it definitely appears to me to be rounding correctly, the issue is that when you decrease the rounding precision and it gets to the point where it rounds up to the nearest second and /or minute it is not checking to see if it is at 60 in which case it should round up further to the degree.

So where I agree, I think it is at the very least sloppy programming, I am not sure you will get a sympathetic ear.  But it never hurts to try.
Jack
Windows 64 bit
2020 Pro-Platinum

Alvin Gregorio

#13
Quote from: jackbat on April 08, 2021, 03:33:19 PM
it definitely appears to me to be rounding correctly, the issue is that when you decrease the rounding precision and it gets to the point where it rounds up to the nearest second and /or minute it is not checking to see if it is at 60 in which case it should round up further to the degree.

So where I agree, I think it is at the very least sloppy programming, I am not sure you will get a sympathetic ear.  But it never hurts to try.

You seem more knowledgeable-- about almost everything-- than me jackbat, so I have to ask:

Why do you say "it definitely appears to me to be rounding correctly", when 44°59'59.28" rounds UP instead of down?  I can see accurate programming getting confused at __°__'__.50", but 28 is definitely less than half of 100, so how can it be rounding up is "being rounded correctly"?
____
[Edited by Alvin 4/8/21; 05:00:49 PM PDT, to change the decimal reference from 38/60 to 50/100.  I almost messed that up]
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)

jackbat

#14
Well Alvin, I don't think that is likely so, but I can try to explain my thinking here.

For me this was more an an analysis in programming and math than CAD.  Something which I have far more experience in.  In order to round in degrees minutes and seconds it would be a a fairly complicated routine when you add selectable precision to the mix.  Most programmers would stay away from that if using decimals was an option. 

Degrees, minutes and seconds has a direct decimal mathematical representation when you consider a degree is 60 minutes and a  60 seconds to a minute.  So with that in mind, if you convert 44°59'59.28" to decimal, you get 44.999722.

So now if you begin the rounding process to 4 decimal points you will have 44.9999.  Because you are taking that level of precision and now converting back to degrees, minutes and seconds,  seconds  rounds up to 60 but because the remainder is less than a whole number it will stay at 59.  However, with a simple "case check" or "if statement" would check to see if seconds was 60 and round it to 0 and minutes to 60 which would in turn round up to 0 and make degrees 45.

It is interesting to note though, that this would be technically an incorrect answer as well because you are now rounding up with a looser precision than was called for.  So my point was that although William is correct and you should never have 60 seconds without pushing that up to minutes, he is also wrong that the angle should not round to 45 with the chosen degree of accuracy because doing so would actually change the accuracy to rounding up to the nearest whole degree.

It is likely that a discussion took place at the time of programming this routine and this is where they came down as a compromise.  They are not the first group of engineers to come across this question.  I just took a quick look to see if I could find another calculator that did it this way and found it on the third try at this link.

http://aprs.gids.nl/degMinSec.html#:~:text=The%20degree%20is%20divided%20into,into%20sixty%20parts%20called%20seconds.&text=Each%20degree%20is%20split%20up,These%20parts%20are%20called%20minutes.

If you go to that page, at the bottom is a couple of calculators and if you put 44.9999 into the calculator it will round it the same way TCad does.  However, and again interestingly enough, if you try to put in 44°59'60" it will throw an error and not allow you to put 60 seconds in.

As an alternative, 44.9999 degrees is = to 44° 59' 59.64" but now you are heading into fractional seconds and I am not sure TCad goes there but this is probably the most correct answer (in my opinion) if you are picking horse.

So to sum it all up, this is why I said I didn't think William would find a sympathetic ear because the only real way to fix this would be for TCad to throw an error offer to change the  rounding accuracy for the user. That is why I started this discussion by asking William if he adjusted the accuracy level.

Does that make sense?

(it occurs to me after I wrote this that not everyone will know why I rounded to 49.9999.  I did this because if you do the math out manually the remainder after you calculate minutes is .98332 which rounds up to .99 .  I probably should have noted that above.)  Fact is without knowing what algorithm they are using you can come up with a few answers and honest people could argue any of them.
Jack
Windows 64 bit
2020 Pro-Platinum

Alvin Gregorio

Quote from: jackbat on April 08, 2021, 06:11:12 PM
Well Alvin, I don't think that is likely so,...

Good stuff.  Thank you.

And Thanks for writing it so that even a layperson like me can comprehend it.
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)

Alvin Gregorio

#16
Interestingly, when I set my Drawing Space Units to Surveyor with a Precision of 10 (for test purposes) [edit: any Precision value], and insert a Line at an angle of 44°59'59.28", when I select that Line, the Selection_Info_Palette/Metrics/Angle reports that angle to be 44°59'59.28".

It knows how to get that accurate, but not in an Angle Dimension.

:P
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)

sauerkraut2018

Hello,

my comment on this:
- it is also like this in the version TC2016PP ... see picture.
- The question for me is how Turbocad deals with it internally. Is the calculation carried out correctly internally?

In such a case I always imagine that I want to fly to a distant planet.
How far is the deviation at a very large distance?
Could I land on the planet or would I fly past the planet?

That would be the question to mathematicians.

I would be happy to hear from you.

Best regards
#-----
Very low knowledge of English - I ask for indulgence - Thanks
Currently installed
TurboCAD Professional 32-bit V.17.2.77.1
TurboCAD 2016 ProPlatinum 64-bit V23.2-61.2 engl.
TurboCAD 2021 Platinum 64-bit V28.0 B.82.3 de.
#-----

jackbat

OK, two things....

First - Sauerkraut - I woke up, read this and laughed.  My first question as an engineer would be:  Well how big is the planet and are we rounding off the size?

Second, Alvin, I think the issue really comes down to they didn't really know how to handle the display of the precision request.  Really the only way to fix this to Bill's concerns would be to have a different rounding system for this type of measurement.  Probably more along the lines of asking the user if they want it rounded to degrees, minutes, seconds or fractional seconds.

This would be a relatively easy algorithm for programmers with more clear and predictable results for the end user.

The danger to that type of system for Bill in this instance would be that he actually did not have an accurate angle and he would not have known unless he looked in the info pallet.  That however would be a user error and not a program error.

Software engineers love than to answer a trouble ticket with "User Error" but they are often too quick off the line with that one.

I just got a reply from IMSI this morning telling me that Pop up menus do work on ribbons so now it is my job to actually get them to try it or to explain why maybe it works for them and not others. >:(
Jack
Windows 64 bit
2020 Pro-Platinum

sauerkraut2018

Hello jackbat,

nice if it made you happy in the morning.

But, a clever person once said: There are no stupid questions, but answers.

I think I can remember that there was one such problem at NASA as well.
#-----
Very low knowledge of English - I ask for indulgence - Thanks
Currently installed
TurboCAD Professional 32-bit V.17.2.77.1
TurboCAD 2016 ProPlatinum 64-bit V23.2-61.2 engl.
TurboCAD 2021 Platinum 64-bit V28.0 B.82.3 de.
#-----

jackbat

Hello sauerkraut,

It seems as though I offended and I certainly didn't intend that.  I went back to reference your post to see if there was a question that I referred to but I still don't see it.

I made a comment to the calculating error by distant planet scenario because frankly I thought you were jesting.

So my apologies.  No offence intended.
Jack
Windows 64 bit
2020 Pro-Platinum