[SOLVED] How to remove double lines?

Post questions on how to use or achieve an effect in Inkscape.
User avatar
d4rkheart
Posts: 32
Joined: Fri May 27, 2011 9:34 am

[SOLVED] How to remove double lines?

Postby d4rkheart » Sun Jun 05, 2011 11:59 pm

Hi to everyone, there is an extension or work-around that automatically remove
a lot of double lines? In my drawing it's impossible to remove manually every line. Thanks.
Last edited by d4rkheart on Wed Jun 08, 2011 5:00 am, edited 2 times in total.

User avatar
BobSongs
Posts: 324
Joined: Fri Sep 14, 2007 2:18 pm
Location: Montreal, Canada

Re: How to remove double lines?

Postby BobSongs » Mon Jun 06, 2011 12:21 am

It would be very very helpful if you could either attach a copy of your original file, or some simpler file that has the same problem. I simply have no idea if the "lines" are lines of text or lines drawn by some tool.

A brief explanation of how so many lines (text or drawn) made their way into the document would help.

Also, what version of Inkscape are you using?
Last edited by BobSongs on Tue Jun 07, 2011 1:01 pm, edited 1 time in total.

User avatar
d4rkheart
Posts: 32
Joined: Fri May 27, 2011 9:34 am

Re: How to remove double lines?

Postby d4rkheart » Tue Jun 07, 2011 2:29 am

Hi BobSongs, thanks for your answer. I'm using Inkscape 0.48.1 and i'm drawing a polygon
viewtopic.php?f=5&t=9519
with the effect "stitch subpaths" my polygon has double lines that i want to delete, is possible automatically?

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: How to remove double lines?

Postby ~suv » Tue Jun 07, 2011 3:15 am

Bug #521988 in Inkscape: “Patch: Eliminate duplicate path segments” has an inkscape extension attached which seems to work reasonably well (apply once or twice on the path after converting the path effect to a regular path), at least with smaller test examples (6 and 10 corners).

If you need more instructions which files to download and how to install the extension, just ask (don't forget to provide info about or OS/platform).

Note though that the extension was not thoroughly tested on a wider range of cases, and IIRC was originally written with a narrow (specific?) task in mind (to help producing laser-cut parts).

User avatar
d4rkheart
Posts: 32
Joined: Fri May 27, 2011 9:34 am

Re: How to remove double lines?

Postby d4rkheart » Tue Jun 07, 2011 4:32 am

@~suv, thanks. I'm using inkscape on windows vista. How can install this extension? I have downloaded the paths on this link: https://bugs.launchpad.net/inkscape/+bu ... dundant.py

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: How to remove double lines?

Postby ~suv » Tue Jun 07, 2011 7:59 am

You need to download these two files:To install the extension on Windows Vista:
  1. quit any running inkscape instance
  2. place both files into the user extensions folder

    Code: Select all

    %APPDATA%\Inkscape\extensions
    Note: you can enter the string including the environment variable %APPDATA% as is into the address bar of the Explorer, if you don't know the location of the directory on your system.
  3. restart inkscape: if all went well, you can find the new extension in the 'Extensions' menu:
    Extensions > Modify Path… > Remove redundant edges

User avatar
d4rkheart
Posts: 32
Joined: Fri May 27, 2011 9:34 am

Re: How to remove double lines?

Postby d4rkheart » Tue Jun 07, 2011 10:15 am

@~suv, Thanks. I'll try this extension.

User avatar
d4rkheart
Posts: 32
Joined: Fri May 27, 2011 9:34 am

Re: How to remove double lines?

Postby d4rkheart » Wed Jun 08, 2011 1:09 am

i have uploaded an image of my polygon, realized with the effect "stictch sub-paths", there is a patch or a solution for this bug?
Attachments
bug.png
bug.png (45.98 KiB) Viewed 15725 times

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: How to remove double lines?

Postby ~suv » Wed Jun 08, 2011 1:52 am

d4rkheart wrote:i have uploaded an image of my polygon, realized with the effect "stictch sub-paths", there is a patch or a solution for this bug?

You mean the rendering glitches on-canvas with paths which have a lot of nodes? Slightly change the zoom level, or the path width (or both). Those issues are known - they appear to depend on the zoom level and are influenced e.g. by the stroke width. If the same happens when exporting to PNG (File > Export Bitmap…), try varying the DPI value in the export dialog slightly (use 89 or 88 instead of the default 90). Hopefully the new renderer (on the roadmap for 0.49) will handle such paths better.

User avatar
d4rkheart
Posts: 32
Joined: Fri May 27, 2011 9:34 am

Re: How to remove double lines?

Postby d4rkheart » Wed Jun 08, 2011 2:32 am

@~suv
"You mean the rendering glitches on-canvas with paths which have a lot of nodes?"
Yes, when I change the zoom level doesn't always solve the problem, and then I'm forced to change the lines' thickness. With png files i haven't problems.
I hope the 0.49 version solves these bugs.

For the extension "Remove redundant edges" i have selected my polygon, ctrl+k and after i have applied this extension, is correct?

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: How to remove double lines?

Postby ~suv » Wed Jun 08, 2011 2:58 am

d4rkheart wrote:For the extension "Remove redundant edges" i have selected my polygon, ctrl+k and after i have applied this extension, is correct?

Why ctrl+k? 'Path > Combine' has no effect on a single path (it combines multiple paths into one path i.e. each path of the selection is turned into a sub-path of the resulting combined path).

Steps:
  1. Draw the polgon with the Star/Polygon tool
  2. menu 'Path > Object to path' (Shift+Ctrl+C)
  3. Apply path effect 'Stitch Sub-Paths'
  4. adjust 'Number of Paths' to '2'
  5. Switch to the Node tool (F2), select all nodes (Ctrl+A) and break path at selected nodes (Shift+B)
  6. Switch back to the Select tool (F1)
  7. menu 'Path > Object to Path' (Shift+Ctrl+C)
  8. 'Extensions > Modify Path > Remove redundant edges' [1] [2]

[1] Possibly apply twice (check for duplicate lines in-between the same way how you detected they are duplicates in the first place)
[2] In my tests, when breaking the path apart with menu 'Path > Break Apart' (Shift+Ctrl+K) after having applied 'Remove redundant edges', it turns out that the extension creates a number of single-node path (segments) at the location of the polygon corners when removing redundant edges. I don't know why you need to remove the redundant lines, nor if having those single-node (sub-)paths around will interfere with whatever process you later apply to the created figure.

User avatar
d4rkheart
Posts: 32
Joined: Fri May 27, 2011 9:34 am

Re: How to remove double lines?

Postby d4rkheart » Wed Jun 08, 2011 4:56 am

@~suv Thanks for your help, i read ctrl+k on this link https://launchpadlibrarian.net/39338070 ... tool-2.svg
but I didn't know that it combined multiple paths ;( I'm so Ignorant.
I want remove double lines because i can deform or remove some of my polygon's segments, without this extension i remove the first line and then can work with the second segment , i have problems with Polygons that have 10 or more angles.
Thank you so much for all your instructions ;)
Attachments
g3029.png
g3029.png (25.06 KiB) Viewed 15690 times


Return to “Help with using Inkscape”