Bug 86989 - EDITING: Modify > Connect sometimes adds extra lines or doesn't close the bezier
Summary: EDITING: Modify > Connect sometimes adds extra lines or doesn't close the bezier
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Drawing (show other bugs)
Version: 4.3.4.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-03 23:37 UTC by dg1727
Modified: 2014-12-03 23:42 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Input file for issues A & B (1.28 KB, application/pdf)
2014-12-03 23:37 UTC, dg1727
Details
Output file from 4.2.0.4, issue B (9.40 KB, application/vnd.oasis.opendocument.graphics)
2014-12-03 23:38 UTC, dg1727
Details
Output file from 4.3.4.1, issues A & B (9.45 KB, application/vnd.oasis.opendocument.graphics)
2014-12-03 23:39 UTC, dg1727
Details
Input file for issues A, B, C (1.36 KB, application/pdf)
2014-12-03 23:40 UTC, dg1727
Details
Output file from 4.2.0.4, issues B & C (8.85 KB, application/vnd.oasis.opendocument.graphics)
2014-12-03 23:41 UTC, dg1727
Details
Output file from 4.3.4.1, issues A, B, C (8.62 KB, application/vnd.oasis.opendocument.graphics)
2014-12-03 23:41 UTC, dg1727
Details

Description dg1727 2014-12-03 23:37:31 UTC
Created attachment 110429 [details]
Input file for issues A & B

This bug report includes 3 related issues or aspects of the same issue.  Testing was done with LO 4.2.0.4 and 4.3.4.1 on Ubuntu, as described below.  

1.  Start with "dwg 1 ver. 1- from Inkscape.pdf" (the ultimate source of the diagram was FreeCAD; then Inkscape was used to make a few edits & convert SVG to PDF).  

2.  Open this file in LO Draw 4.2.0.4.  

3.  This 2D diagram has a hollow region at the top & one at the bottom.  The user wants to fill these 2 regions with a hatch pattern.  

4.  First, the top region.  Select the 13 draw objects that form the boundary of this region.  These are 12 lines (including, at the right-hand side, a very short vertical line which is difficult to select) & one bezier.  

5.  Modify > Connect 

6.  In the "Line and Filling" toolbar, set Area Style/Filling to "Hatching - Black 45 degrees".  

7.  LO Draw 4.2.0.4 does this correctly.  

8.  Issue A:  In step 5, LO Draw 4.3.4.1 produces 1 or 2 short extra line segments, forming an acute angle, sticking out at the right-hand side.  

9.  Next, the bottom region.  Follow steps 4 & 5 for this region.  

10.  Issue B:  In both versions of LO Draw, an extra oblique line appears at the lower left.  

The results of the above 2 issues in the 2 versions of Draw are shown in the two "dwg 1 ver. 2.odg" files.  

About Issue B:  

 * Using "edit points" mode (the Points button in the Drawing toolbar) to move the right-hand endpoint of the unexpected line (e.g., slightly up & to the left) and the lower-left corner of the region (e.g., slightly down & to the left) shows that a total of 3 extra lines were drawn, 2 of which coincided with lines that were present in the PDF.  

 * Trying to "nudge" the segments (using "Snap to Object Points" in the Options toolbar, before the Connect command), so their endpoints exactly coincided, typically didn't prevent the extra lines from being drawn.  In my testing, it did once out of several tries.  But even if there is always a procedure of "nudging" the lines that will hide Issue B, I think it is unreasonable to expect the user to do this.  The set of lines looks closed to the user, even at high zoom factors, so LO Draw should be able to connect them with only the Modify > Connect command.  

11.  "dwg 2 ver. 1- from Inkscape.pdf" is similar, up through step 8 of the above.  (This time there are 12 draw objects forming the boundary of each region of interest.)  

12.  Issue C:  For the bottom region, at step 6, in both versions of LO Draw, the hatch pattern isn't drawn, because the bezier isn't closed.  The user needs to click "Close Bézier" on the Edit Points toolbar.  

13.  Once that button is clicked, Issue B (extra line obliquely across the region) occurs in both versions of LO Draw, and Issue A (acute angle sticking out at a junction point) occurs (again) in 4.3.4.1.  

-----
There is a workaround for Issue B, taking advantage of the fact that the bottom region is a mirror image of the top region, and that the top region is correctly connected into a bezier by LO Draw (at least version 4.2.0.4).  I will summarize as:  
 * Edit > Duplicate 
 * Modify > Flip > Vertically 
 * Modify > Break 
 * Snap to Object Points 
 * Modify > Connect 

As with "nudging," I think the user shouldn't have to do this workaround.  

Thanks for help with these issues.
Comment 1 dg1727 2014-12-03 23:38:24 UTC
Created attachment 110430 [details]
Output file from 4.2.0.4, issue B
Comment 2 dg1727 2014-12-03 23:39:00 UTC
Created attachment 110431 [details]
Output file from 4.3.4.1, issues A & B
Comment 3 dg1727 2014-12-03 23:40:32 UTC
Created attachment 110432 [details]
Input file for issues A, B, C
Comment 4 dg1727 2014-12-03 23:41:09 UTC
Created attachment 110433 [details]
Output file from 4.2.0.4, issues B & C
Comment 5 dg1727 2014-12-03 23:41:47 UTC
Created attachment 110434 [details]
Output file from 4.3.4.1, issues A, B, C
Comment 6 dg1727 2014-12-03 23:42:52 UTC
The filenames mentioned in the bug description are viewable by clicking the Details links in Bugzilla.


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.