Jump to content
  • 1

Trouble with the resulting size of a solid subtraction.


Bruce Kieffer

Question

Has anyone else had this problem, and possibly found a solution? When I subtract a 7/8" wide object inserted 7/16" into a 3/4" thick object, the resulting solid subtraction is .750", it should remain 3/4" thick. I have Units set to Exact as Fractions/Non-Exact as Decimals. It appears to be some corruption in my file, and I have better success with the subtraction if I make sure the objects are on the grid, which should have nothing to do with the resulting thickness. I believe I imported a SketchUp file into this file, and again that should have no affect.

Link to comment

Recommended Posts

  • 0

Bruce,

If object dimension displays as a decimal value instead of as a fraction (because of setting for fractions when exact) could that mean that some component was not exact? Or the placement of one of the objects prior to the subtraction was not exact?  A pixel or two off of an exact snap would trigger the fraction.

 

I wonder what happens if the drawing pref decimal precision is increased to 8 or 9 places and the dimension object precision to same 8 or 9 places, or more.  Maybe that will show some placement or object size is just a little bit off.

 

Or, more likely, Vectorworks is taunting us.

 

-B

  • Like 1
Link to comment
  • 0

Benson is probably correct. I think we had a LOOONG discussion of this about 10 years ago on the tech board on one of the mail lists. I can't find the information right now so here goes from Memory.

 

The problem is that binary (base 2) floating point math is not exact for many simple decimal (base 10) fractions. That means that what really happens for many numbers is that you get a long approximation of the fraction. You basically have to add fractions of powers of 2 (1/2+1/4+1/8....) skipping the ones that don't work well. When you are just a tiny bit off you end up adding the binary version of 1/2048 or 1/4096 or even higher).  

 

So while VW is rounding the value for display to you to 0.750, internally it may be 0.74999997 or 7.500003 

 

Internally somewhere is is a calculation that determines how many significant figures to use to do comparisons. 

 

It appears that something in your drawing is enough off so that it is not comparing exactly to 0.75 at however many decimal places are used internally.  

 

Something in the back of my brain wants to say it is 11 decimals places, so you don't have to be very far off for things to not match.

 

  • Like 2
Link to comment
  • 0

Let me tell you what I'm doing: I'm cutting biscuit grooves on the edges of a 3/4" thick panel. In the real world that operation does not change the width or length of the 3/4" thick panel. In the Vectorworks world in my file it does change the panel dimension, and that is wrong. I never had this problem before Vectorworks 2017, and I cannot create the problem in a new file, which leads me to believe there's corruption in this file and most likely due to the importation of the SketchUp file.

 

I'm doing some experimentation trying to pin down the issue now. I'll report back shortly and possibly attach a sample file.

Link to comment
  • 0

I did some trouble shooting this morning trying to figure out why Vectorworks does not do what I think it should do. I can subtract objects from objects without goofy dimensional results, but when I subtract a symbol from an extrude then I get odd dimensional results. I'm convinced this is a previous bug that was reintroduced in Vectorworks 2017. The sad thing is I feel I spend more time trouble shooting then working to make money. I hope the powers that be are listening.

Link to comment
  • 0

Bruce,

 

If you have an example that repeatedly give you the incorrect result, then you need to make sure you submit it. VWI does not have your experience in causing the problem. If they can't cause the problem to happen for them, they can't fix it.

 

Please always submit the steps required to create an issue. Makes sure things get fixed faster.

Link to comment
  • 0
  • Marionette Maven

Hi Bruce,

 

This will end up being a very controversial conversation, however I want to point out that this likely isn't Vectorworks' fault.

Computers, when doing math, have rounding errors that aren't always handled the way that the user would expect.

 

Hopefully this article can help clear it up, at least a little.

https://blog.codinghorror.com/why-do-computers-suck-at-math/

Link to comment
  • 0

Alan,

This appears to be a Mac problem. It still shows .750" when I have the settings as you do on your PC. I want my settings exact as fraction, non-exact as decimals for the very reason the setting exists. I want to know when the number is not an exact fraction. Like I said before, this was a problem a few VW versions ago, and now it's back.58a7684cac354_ScreenShot2017-02-17at3_13_12PM.png.7d510c5c51d1cbf9019843868e9a3a3a.png

Link to comment
  • 0

@Bruce KiefferBruce I see the issue, each panel appears to hold the Units settings that you used originally. Double click on the other units and go units and you will see it is selecting the bottom one. select the fraction one and it will be ok.Generaly you need to have nothing selected then set units. Do each of the 2 on the left and they should stay 3/4 "

Link to comment
  • 0
  • Vectorworks, Inc Employee
On 1/30/2017 at 10:56 PM, Pat Stanford said:

Benson is probably correct. I think we had a LOOONG discussion of this about 10 years ago on the tech board on one of the mail lists. I can't find the information right now so here goes from Memory.

 

The problem is that binary (base 2) floating point math is not exact for many simple decimal (base 10) fractions. That means that what really happens for many numbers is that you get a long approximation of the fraction. You basically have to add fractions of powers of 2 (1/2+1/4+1/8....) skipping the ones that don't work well. When you are just a tiny bit off you end up adding the binary version of 1/2048 or 1/4096 or even higher).  

 

So while VW is rounding the value for display to you to 0.750, internally it may be 0.74999997 or 7.500003 

 

Internally somewhere is is a calculation that determines how many significant figures to use to do comparisons. 

 

It appears that something in your drawing is enough off so that it is not comparing exactly to 0.75 at however many decimal places are used internally.  

 

Something in the back of my brain wants to say it is 11 decimals places, so you don't have to be very far off for things to not match.

 

 

51 minutes ago, MarissaF said:

Hi Bruce,

 

This will end up being a very controversial conversation, however I want to point out that this likely isn't Vectorworks' fault.

Computers, when doing math, have rounding errors that aren't always handled the way that the user would expect.

 

Hopefully this article can help clear it up, at least a little.

https://blog.codinghorror.com/why-do-computers-suck-at-math/

 

The two above posts are where this issue ends unfortunately. This can not be corrected in any meaningful way in Vectorworks. If engineering was forced to act on it, most likely they would simply take away the dimensional fields in the OIP for objects that had questionable results at that incredibly small scale and ensure that the dimensions always read correctly instead. I don't like it, but it isn't going to change anytime soon, keeping geometry near or appropriate for the the full unit size in dimensioning is the only way to avoid it.

  • Like 1
Link to comment
  • 0

I don't agree with this. A better option for engineering would be a user settable option for absolute. If a user could set the accuracy they are willing to accept for an absolute value, things would be much better.

 

With Bruce doing wood working, an absolute value of 1000th would be fine. So if the returned value from a calculation wast 0.74999, it would round up and display as an absolute of 3/4 inch. He does not need an accuracy of 11 decimal places. 3 2ould be enough. 

 

VW should be able to use a user settable decimal to fraction conversion and handle this all internally.

 

JM2¢W

 

Pat

 

Link to comment
  • 0

I think this is why programs like Rhino have different templates for different situations (image below). Even C4D has this type of adjustment.

It will become more and more of an issue as more users use VW for digital manufacturing. When I work on events, the tolerance can be 1" or more. When I work on jewellery, I'm working to tolerances of 0.1 of a mm or even less. 3D printing requires these kinds of tolerances.

 

Kevin

 

58a77a6777e49_ScreenShot2017-02-17at2_30_22PM.png.03014052c9b5ff1ee4517acff35eb48c.png

Link to comment
  • 0
52 minutes ago, Pat Stanford said:

I don't agree with this. A better option for engineering would be a user settable option for absolute. If a user could set the accuracy they are willing to accept for an absolute value, things would be much better.

 

With Bruce doing wood working, an absolute value of 1000th would be fine. So if the returned value from a calculation wast 0.74999, it would round up and display as an absolute of 3/4 inch. He does not need an accuracy of 11 decimal places. 3 2ould be enough. 

 

VW should be able to use a user settable decimal to fraction conversion and handle this all internally.

 

JM2¢W

 

Pat

 

Pat is absolutely correct with this answer. I need to know when I'm off by 1/32, not by .0000000001.

Edited by Bruce Kieffer
Link to comment
  • 0
  • Vectorworks, Inc Employee

Correct, if the document units were set so that a whole number in those units was within the realm of the accuracy needed, then it would most likely not be an issue. if you need to measure down to the accuracy of a percentage of the thickness of a strand of hair (effectively the size of the inaccuracy being discussed here) then inches and 16ths of an inch are too large a unit to do so.

We don't force it like other applications do, they just automatically round the value the user is shown to make them feel better (or automatically change to a smaller unit of precision), the error still exists underneath. I would say letting the user set an absolute rounding value would also make sense, but it's still a "dishonest" value underneath. I'll broach the topic with the directors and see what they think, this is likely not something that's come up for them in awhile according to a quick internal tracking and forum search.

EDIT: However, to clarify, wouldn't asking for manual control over the rounding be giving the user the same control as they currently have when setting the Fraction precision to 1/64 and not showing decimals for inexact fractions?

Link to comment

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
Answer this question...

×   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...