Bug 72687

Summary: poor precision in rotation (Draw)
Product: LibreOffice Reporter: Roberto Casini <casinir64>
Component: DrawingAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: major    
Priority: medium CC: stgohi-lobugs
Version: 4.0.1.2 release   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: shows a circle with various radii at different angles
test case

Description Roberto Casini 2013-12-13 18:30:06 UTC
Created attachment 90740 [details]
shows a circle with various radii at different angles

1) draw a circle and its radius, using "snap to grid" (e.g., a vertical radius)
2) rotate the radius around the center of the circle by any amount other than a multiple of 90 deg

-> the rotated radius is consistently shorter and does not reach the circle, despite the length of the radius being correct (within the precision of the displayed figures; I tried to see if it is possible to increase the internal precision of Draw but with no success)

I'm using mm units as default.
Comment 1 foss 2013-12-14 22:22:21 UTC
4.0 is End of live. Have you tried how 4.1.3.2 or 4.2 beta 2 behave?

http://www.libreoffice.org/download/pre-releases/

Also could you attach a draw document and precise reproduce steps if the bug is still valid with those new versions?
Comment 2 A (Andy) 2014-09-26 19:57:14 UTC
Could you please give more information about the different steps to reproduce this issue.
Comment 3 Roberto Casini 2014-09-27 20:20:31 UTC
I'm not sure what to add beyond what I've already stated in my initial comment, since all operations I listed use standard functionalities of the Draw program.

The drawing of a circle and its radius are performed with the "snap to grid" option turned on, to make sure that there are no freehand positioning errors in the resulting figure. Just to make sure, I then open the Format->'Position and Size' dialogue to verify the aspect ratio of the circle (i.e., to make sure it didn't come out an ellipse) and the length of the radius. The error can then be reproduced with the following (very detailed!) steps:

1) Select the circle

2) Open the Format->'Position and Size' menu, and select the 'Position and Size' tab

3) In the 'Position' part of the tab, select the central base point of the figure, and annotate its X and Y coordinates. These are the coordinates of the circle's center

4) Close the 'Position and Size' menu

5) Back in the drawing, select the radius and make a copy of it on itself (via Ctrl-C and Ctrl-V)

6) With the radius still selected, open the Format->'Position and Size' menu, and select the 'Rotation' tab

7) Enter the coordinates of the circle center (annotated in step #3) into the Pivot Point fields

8) Enter an angle different from a multiple of 90 deg (e.g., 45 deg) in the Angle field, and click OK

9) Back in the drawing, zoom in around the region where the rotated radius should meet the circumference. The rotated radius consistently fails to reach all the way to the circumference, other than when the rotation angle is a multiple of 90 deg

This bug is preserved also while exporting the drawing. I also verified that the bug is still existing in v.4.1.6.2 for Linux.
Comment 4 A (Andy) 2014-09-27 20:38:19 UTC
Thanks for your fast reply.
Because I am unfortunately not a DRAW expert, what do you mean in step 5 with "select the radius"?  What do I have to do?
Comment 5 Roberto Casini 2014-09-27 20:53:22 UTC
Just go over it with the cursor and click on it. Once an object is selected in Draw, the "anchor points" that delimit the object will pop up in the form of tiny square boxes. That tells you that the object has been selected.

The same goes for the circle. Go over the circumference and click on it with the mouse. You'll see 8 anchor points pop up, defining the perimeter of the square circumscribing the circle.

Hope this helps!
Comment 6 A (Andy) 2014-09-27 21:16:10 UTC
Thanks, but I am still doing something wrong.  In Step 3 my X and Y coordinates are both 5.00 cm.  In Step 7 I also entered these 5.00 cm.  In Step 8 I am testing it with several different angles and now the second circle I have created in Step 5 is moved around (im my case up to right).  If I go back to the tab ROTATION the X and/or Y cooordinates have been changed. 
Therefore, I don't know how to get to your attachment.  What is my mistake or misunderstanding?
Comment 7 Roberto Casini 2014-09-27 21:36:11 UTC
Created attachment 106971 [details]
test case
Comment 8 Roberto Casini 2014-09-27 21:37:32 UTC
I added a .odg file containing a circle and a radius. From what you described, it seems that you didn't have a radius, and you were instead selecting the circle and rotating it around some pivot point that is not the circle's center. See if starting from this example you can follow the steps of my previous message.
Comment 9 A (Andy) 2014-09-27 22:20:41 UTC
Thanks for your patience and help.

Result: Reproducible with LO 4.3.2.2 (Win 8.1)


Now only two issues are left for me: 

1. How do I get this radius?  Is this in LO for Windows different to Linux?

2. Why, always if I change the angle and afterwards go again to FORMAT -> POSITION AND SIZE -> tab ROTATION, the X and Y coordinates are changed?  Is this another bug?  Why do they not keep the coordinates I entered?
Comment 10 Roberto Casini 2014-09-27 22:45:47 UTC
I'm not sure what you're asking in your question #1. Do you mean how you draw the radius?

The fact that when you access the Rotation tab of the 'Position and Size' menu the coordinates you see are not the ones you entered is NOT a bug. That tab defaults to a pivot point that is the median point (center of gravity) of the selected object. When you entered by hand the X and Y coordinates of circle's center as the pivot point for the radius rotation, you selected instead one of the end points of the radius.

Cheers

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.