in

connecting users of the CorelDRAW family of products

Dimension Rounding Error

Last post 08-26-2008 10:12 by Hendrik Wagenaar. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 08-23-2008 11:26

    Dimension Rounding Error

    Does anyone know why the dimension .875" (and similar dimensions) round off to .87 instead of .88 when switching from 3 to 2 decimel places? See attached. I often need dual dimensions in inches and mm, and the conversion to mm also rounds off incorrectly. This also happened in Design12, and I was hoping for a fix in Designer X4. Thank you for any help or insight...this is driving me crazy!

    Regards,

    Cindy


    Choose a job you love, and you will never have to work a day in your life.
    ...Confucius
  • 08-23-2008 21:51 In reply to

    • Hugh Johnson
    • Top 25 Contributor
      Male
    • Joined on 05-16-2007
    • Murrieta, California, U.S.

    Re: Dimension Rounding Error

    Probably when you go from 'x' decimal places to 'y' (less) decimal places, the values are truncated rather than rounded to nearest minor value.

    HuMJohn
    aka H Johnson
  • 08-24-2008 11:08 In reply to

    Re: Dimension Rounding Error

    Yes, the values are obviously incorrectly truncated...even starting with 2 decimel places without switching from 3 to 2 decimel places a .875" sized rectangle still rounds to .87" instead of .88. Shouldn't dimensions be rounded correctly if this is a supposedly technical drawing program? This makes it unsuitable as a CAD substitute and unacceptable for technical drawings that need dimensions with 2 decimel place precision.

    Any chance this can be fixed in the next service pack...please?

    Regards,

    Cindy

    Choose a job you love, and you will never have to work a day in your life.
    ...Confucius
  • 08-24-2008 13:24 In reply to

    • Hugh Johnson
    • Top 25 Contributor
      Male
    • Joined on 05-16-2007
    • Murrieta, California, U.S.

    Re: Dimension Rounding Error

    Oh, and another item.....the internal number may have many more decimal places that what you see on the screen. i.e.: while you see something like 0.87, the internal, binary number may be something like 0.87501030456, which, for display purposes, only shows the first two digits (or three or however many you specified) and not go through the "rounding process".

    Yes, it could be rounded, for display purposes, by adding more code to the display software. I don't think this will be that high on the list of To-Do's that the software developers are working on, for the next SP. (This would be considered slightly below an annoyance, that is on a wish list and not on a bug list, I beleive.)

    HuMJohn
    aka H Johnson
  • 08-26-2008 8:12 In reply to

    Re: Dimension Rounding Error

    Hi Cindy,

    Hugh was on the right track when he said your number wasn't exactly 0.8750, but he was wrong when he thought it was truncated.  The number you're rounding is not 0.8750, it's probably something like 0.874999, so when you round it to 2 decimal places, it's closer to 0.87, not 0.88.

    To test this thoery, I created 2 sets of lines.  The first set of lines are 0.874988" apart, the second set are exactly 0.87500" apart.  I then measured the distance using the dimension tool and changed the precision.  As you can see from the attached image, Designer is indeed rounding the values correctly.

    As you may know, if you're not getting the values you want, you can turn off dynamically dimensioning and manually enter your own values.

    I'm not sure what you mean by the "22.22 mm should be 22.4 mm" comment?  Please explain.

    Regards,
    Hendrik


  • 08-26-2008 8:55 In reply to

    • Hugh Johnson
    • Top 25 Contributor
      Male
    • Joined on 05-16-2007
    • Murrieta, California, U.S.

    Re: Dimension Rounding Error

    Thank you for the information, Hendrick. Appreciate learning a little of the internals of Draw.

    Hugh

    HuMJohn
    aka H Johnson
  • 08-26-2008 9:48 In reply to

    Re: Dimension Rounding Error

     Hi Hendrik,

    Thanks for the info. I am not sure how to correct it other than using 3 decimel places.  I also think the problem is compounded when working in scale.(1"=4")

    Regarding the mm comment:

    I need to create dual dimensions and usually just duplicate the dimension in inches and switch it to mm, then break apart and delete the extra arrows, etc. This is the fastest/easiest way. I find that with the rounding errors, this way is not always accurate. If I turn off dynamic dimensioning, I would need to manually convert which would be more accurate, but much slower!

    For example, I used a unit convertor program to check the conversion from inches, to mm and I get the following:

    .87"=22.10 mm

    .88"=22.35 mm (or 22.4 mm if rounded)

    In my example shown in original post, Designer converted .87" to 22.22 mm which seems like a large difference from 22.4 mm. Since I am not designing rocket ships, this difference may not matter much!

    I love the program anyway and refuse to learn Autocad!

    Regards,

    Cindy

     

    Choose a job you love, and you will never have to work a day in your life.
    ...Confucius
  • 08-26-2008 10:12 In reply to

    Re: Dimension Rounding Error

    Hi Cindy,

    Robeester:
    Thanks for the info. I am not sure how to correct it other than using 3 decimel places.
     

    I assume that you know that your object is supposed to be exactly 0.875000000?  You could turn off dynamic dimensioning and enter in 0.88".

    Robeester:

    .87"=22.10 mm

    .88"=22.35 mm (or 22.4 mm if rounded)

    We're rounding the real value, not the rounded value in inches.  Again, the real value is likely something like 0.87499, when converted to mm is 22.224746 mm, rounding this to 22.35, or 22.4 would be very wrong.

    I hope this makes sense,

    Regards,
    Hendrik

Page 1 of 1 (8 items)
© 2008 Corel Corporation. The content herein is in the form of a personal web log ("Blog") or forum posting. As such, the views expressed in this site are those of the participants and do not necessarily reflect the views of Corel Corporation, or its affiliates and their respective officers, directors, employees and agents. Terms and Conditions.