Bug 86989 - EDITING: Shape > Connect sometimes adds extra lines
Summary: EDITING: Shape > Connect sometimes adds extra lines
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: PDF-Import-Draw
  Show dependency treegraph
 
Reported: 2014-12-03 23:37 UTC by dg1727
Modified: 2023-07-07 13:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


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

Note You need to log in before you can comment on or make changes to this bug.
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.
Comment 7 QA Administrators 2015-12-20 16:19:41 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2017-01-03 19:50:44 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2019-12-03 14:26:24 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2021-12-03 04:33:09 UTC Comment hidden (obsolete)
Comment 11 BogdanB 2023-05-27 07:36:10 UTC
dg1727, a bug will stay in Unconfirmed status until someone else can confirm it, and will mark the bug as New. Please wait for someone to test this bug. Thank you for reporting this.
Comment 12 Buovjaga 2023-07-07 13:41:44 UTC
The command is now Shape - Connect.

I selected the parts by painting a selection rectangle. It selected 14 parts, though.

I reproduce the issues A and B. Issue C is no longer possible to reach as LibreOffice doesn't allow access to Area.

Issue A happens after 9616b786adb9491f7c26fc0f1053e7b3d1b35f27
fdo#45003 PDF import: Implementing linejoin and linecap properties

Not sure, if this can be called a regression as such.

I created bug 156190 for issue B, because we should have one report per issue.

Arch Linux 64-bit, X11
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 445ab2355333ddb46081baffb8b0e3bb14fe00b3
CPU threads: 8; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 7 July 2023