Jump to content

Area of rectangle wrong in properties.


ibach

Recommended Posts

a=10559.00000000

b=06000.00000000

axb=63354000.00000000 as far as i can count...

 

in autocad 2014

PRECISION set to 0.00000000

AREA reads 6.33540000E+07

IN PROPERTIES AREA IS WRONG:

63354000.00000002

 

What's wrong with this rectangle?! It is not the only one in my original drawing, and the error persists after WBLOCK AUDIT RECOVER...

zajebano.zip

Link to comment
Share on other sites

  • Replies 30
  • Created
  • Last Reply

Top Posters In This Topic

  • ibach

    9

  • ReMark

    7

  • nestly

    6

  • Dadgad

    2

Top Posters In This Topic

Posted Images

I think someone here said it was a bug in the original release. Have you installed Service Pack 1.1 for 2013?

Link to comment
Share on other sites

No, I do not think that is it...

I think there's more to it...

Has anyone older version of cad to check? I can save it to lower version.zajebano2000.zip

(error persists in 2014)

 

I think it has to do with my other thread and fixoffgrid.lsp but I am not sure... Have a look if you like.

LINK

 

When I use this lisp on same rectangle, the error is different, depending on the fuzz factor defined during use of this lsp.

 

PS: If you explode rectangle to lines they have round values for endpoints, but if you recreate a polyline using MPedit, the error is the same.

Link to comment
Share on other sites

I know that AutoCAD have problem with accuracy when it works with coordinates that use large numbers. But your coordinate is not that far away from 0,0.

I tried to use your drawing to reproduce your problem, and I can see the issue. But I don't have problem when creating new drawing using my own template. I use 2014.

Have you tried to use other templates? What template did you use to create your drawing? I see that you use cm as your drawing unit.

How did you change the unit? Did you simply change the unit or use -DWGUNITS?

Link to comment
Share on other sites

I tested this previously in four different releases of AutoCAD and the master rectangle that I created had the same area reported back to me in each release. Why some users have a problem while many do not I can't explain. Perhaps it is OIE (Operator Induced Error).

Link to comment
Share on other sites

I tested this previously in four different releases of AutoCAD and the master rectangle that I created had the same area reported back to me in each release. Why some users have a problem while many do not I can't explain. Perhaps it is OIE (Operator Induced Error).

 

I bet I can convince you it's not OIE. Open the OOTB template acad.dwt, turn the precision up to 8 decimal places, start the RECTANGLE command and specify the first point as 0,0 and the 2nd point as 10559,6000, and tell us what the area is in Properties. (BTW, OOTB template is just to eliminate one variable, I don't think it matters what drawing is used for the test)

 

Link to comment
Share on other sites

 

That is a very interesting link, thanks for posting it.

Who'd have thunk it? :beer:

 

This also explains the FLATTEN trick of moving non-co-planar entities huge distances along their z axii, before bringing them back in co-planar,

as espoused by SLW210 as I recall. Nice to understand WHY that works.

 

Nice to have a new nestly video to watch, been a while, looks like the Camedia is still working great!

Link to comment
Share on other sites

I took your test rectangle and tried it in AutoCAD 2004, 2007, 2010, 2012, and 2013. I got the same area results in all instances. I can't explain why that is. Believe me though when I say it is not because I live a charmed life. I rarely, if ever, require accuracy beyond two decimal places so I would have no need to go to eight. How many members here need to work with that kind of accuracy anyway would be interesting to know.

Link to comment
Share on other sites

I think that if you use the area command, the correct area is given.

 

BUT, if you look in the properties box, when 8 decimal places are set, the eighth decimal place is not zero, as the OP would expect it to be.

 

This picture from r2000.

areaProperty.JPG

Link to comment
Share on other sites

If you were an intergalactic realtor, specializing in high end transdimensional, and lots were measured in Square Lightyears you would want it to be REALLY accurate! :beer:

Link to comment
Share on other sites

 

That's an interesting read, but IMO is not the reason in this case.

 

There is no object in AutoCAD called a "Rectangle" rather it's just a polyline to AutoCAD, and my understanding is that polylines are calculated based on the distance and angle of each vertex from the origin, so it's not as simple to get the area as multiplying the length and width.

Link to comment
Share on other sites

about accuracy: AutoCAD is to be accurate to 16 decimal places internally.

why I need accuracy: I do need accuracy because it is the first thing in my job description

rectangle: Yes, there s no such object. I could have called it "the shape of polyline", but the area of such shape IS as simple to calculate as AxB even using coordinates and angels it has to be absolutely exact if the angle is 0 (as it really is in my drawing) and if the point coordinates are whole numbers (as they again really are in the example).

 

Why it is not calculated exactly is my question. There is obviously something very wrong in this drawing. What is it?!

If Autocad can produce such error than I cannot trust it at all and every data produced by the software is useless to me.

Link to comment
Share on other sites

I do not see that there is something very wrong in the drawing if there is a discrepancy in the 16th digit. If you set the length unit precision to 7 decimal places, there is no discrepancy in the properties.

 

If you really can't live with the odd figure at the end, perhaps you should not be using AutoCAD :shock:

 

Perhaps it is the operating system writers that you should be castigating.

Link to comment
Share on other sites

about accuracy: AutoCAD is to be accurate to 16 decimal places internally.

why I need accuracy: I do need accuracy because it is the first thing in my job description

rectangle: Yes, there s no such object. I could have called it "the shape of polyline", but the area of such shape IS as simple to calculate as AxB even using coordinates and angels it has to be absolutely exact if the angle is 0 (as it really is in my drawing) and if the point coordinates are whole numbers (as they again really are in the example).

 

Why it is not calculated exactly is my question. There is obviously something very wrong in this drawing. What is it?!

If Autocad can produce such error than I cannot trust it at all and every data produced by the software is useless to me.

 

You know it's a "rectangle" but AutoCAD doesn't.... it's just another polygon. AutoCAD doesn't know if the sides are supposed to be the same length or different, AutoCAD doesn't know if the corners are supposed to be perpendicular to each other, or not. Autocad doesn't know if the lines are supposed to be perfectly horizontal and perfectly vertical.... therefore AutoCAD has to look at each vertex independently, calculate a triangular region to that vertex, then subtract or add all the other triangulated points that have overlapping regions.

 

Re: 16 digits of accuracy....... what is the exact diagonal distance across the corners of a 10559 x 6000 rectangle..... hint...( is it more or less than 16 digits)

Link to comment
Share on other sites

OK, went trough all points individually, got no error up to 8 decimal places, did my math and got same , correct result. No error. Used vectorial equasions, just like acad does.

Started acad again, got same error again...

AutoCAD is jus a big calculator, and it should do its work correctly, as simple as that.

But it is actually not the error it self what I'm interested about, but the origin of the error, and what went wrong.

I do know that autocad will calculate the area correctly if I draw new ...ok... polygon like that one in same drawing.

What could have happened to the old one?! Why, if all vertexes are where they are supposed to be, area is not calculated as it should be?

Why the error at the end is 2, not 1 if it's all about roundingup the numbers?!

This is mathematically odd, strange, interesting...

 

New test: Copy the polygon 1000 units under the old one, explode it, join again and look at the properties... number is 63353999.99999996 now!!!

What the f***! I've changed no geometrical data, just the position.

 

Copy the polygon 1000 units to the left old one, explode it, join again and look at the properties... number is 63354000.00000002!

What is the difference between copy to the left and the copy under the old one? Copy is a copy is it not?!

 

Obviously it is not.

 

Points are (-1913,-26466) (8646,-26466) (-1913,-32466) (8646,-32466) no decimal places in properties, so any roundup should not pass +-0.00000001 ...

Edited by ibach
Link to comment
Share on other sites

ReMark, Dadgad is close... today... I do a lot of different, and as nestly would probably say odd things. Right now I'm modeling some molecules at electron to nucleus scales... So only last few decimal places are what I'm really interested in...

Cad is mostly correct about most things, but there are some random oddities, like this rectangle surface, that puzzles me. ("correct" is an odditie for it self)

I'd like to make a lisp like fixoffgrid.lsp that would fix this problem, but fixoffgrid does not fix this polygon, but it fixes another... and I do not see the difference...

 

As far as i can say it might have to do with floating point precision in AutoCAD... I.E with IEEE Standard for Binary Floating-Point Arithmetic (IEEE 754) that I do not know enough about.

If someone does, please explain it to me. LINK to the article about it... No matter how I explain this to my self I cannot comprehend how the error can be greater than +-0.00000001, possibly +-0.00000002, if i add up errors maybe even +-0.00000004 if I keep adding errors for each piont (4 of them), but how exactly is it generated? This rectangle was correct at the beginning, what happened to it?...

 

The difference is simply too big to be just the matter of rounding numbers...

Edited by ibach
Link to comment
Share on other sites

This is what AutoCAD "sees". It is a rounding error in the triangulation. Rotate or move the polygon a little bit several times and you'll likely the area in properties change by at least +/- 0.00000004.

coords.jpg

Edited by nestly
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...