Convert to Dashes: modify stroke style only if conversion succeeds

Bug #998164 reported by David Mathog on 2012-05-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Alvin Penner

Bug Description

It appears that somewhere along the line

extensions -> modify path -> convert to dashes

broke for curved paths (it still works for lines, at least). (Windows XP SP 3, 32bit)

In the example (attached) select any or all of the curved dotted/dashed paths and try "convert to paths". In current trunk
they turn into a solid line. Earlier versions (a month or so old) leave them dotted/dashed, but they are not converted. At least the "path->break apart" doesn't do anything.

I think the making them solid is the result of an earlier patch (can't find it at the moment, A. Penner put it in) that automatically changed the stroke after conversion to a solid line. Here, since they are not being broken up into dashes, the result is that the whole thing becomes solid.

This used to work (will post an older example where it had been applied.)

David Mathog (mathog) wrote :
David Mathog (mathog) wrote :

This is an older example, the blue dotted/dashed circles in the "separate paths" column had been copied from the "dashed path" column, "convert to dashes" and then "break apart".

Note that in this example the "dashed path" column was erroneously drawn at something other than 100% opacity. Setting
the opacity to 100% doesn't help though.

Trunk as far back as 9819 had the problem where curves could not be converted to separate dashes.

su_v (suv-lp) wrote :

'Extensions > Modify Path > Convert to Dashes' only works with paths, and does not 'auto-convert' Inkscape shapes (ellipse/circle, star/polygon, spirals) to path itself.

Converting the dashed circles to stroked paths divided into sub-paths works for me with Inkscape 0.48.2, current 0.48.x branch (r9898) and current trunk (r11356) on OS X 10.7.4 following these two steps:
1) 'Path > Object to Path'
2) 'Extensions > Modify Path > Convert to Dashes'

Without converting the circles to paths first, the extension only modifies the line styles (the line style change was done to address your earlier reported bug #888793) and leaves the geometry of the Inkscape shape unchanged.

tags: added: extensions-plugins
su_v (suv-lp) wrote :

> broke for curved paths (it still works for lines, at least). (Windows XP SP 3, 32bit)

Not confirmed: it does not "break" for curved paths - the extension never handled Inkscape shapes (only regular paths). Due to the changes to accommodate for EMF export on Windows, the extension now needs to do better error checking (don't change the line style of the modified object unless it is a regular path) or enhanced (handle Inkscape shapes and rectangles transparently).

David Mathog (mathog) wrote :

Ah, right you are. It should probably emit a warning if it is applied to an object rather than a path, since the two can look
identical in the GUI.

Alvin Penner (apenner) wrote :

thanks for the feedback, I'll see if I can make it more user-friendly this weekend

su_v (suv-lp) on 2012-05-11
summary: - convert to dashes broken on curved paths
+ Convert to Dashes: modify stroke style only if conversion succeeds
Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
Alvin Penner (apenner) wrote :

- attached is a modified version of Two changes were made:
- if a non-path element like a rectangle is encountered then a message will be displayed, the same as is done for other extensions like Envelope and Perspective.
- the three path types of arc, star, and spiral will now be converted to dashed lines. Actually this conversion was being done before, but it had been masked by the sodipodi:type attribute. Now it is no longer masked.

Alvin Penner (apenner) wrote :

committed to rev 11360

Changed in inkscape:
status: Confirmed → Fix Committed
Kris (kris-degussem) on 2012-05-14
Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
milestone: none → 0.49
David Mathog (mathog) wrote :

Much better. Thanks.

Now consider what happens in the attached example. if the closed dotted/dashed path is filled on conversion to dashes the fill is lost. Which makes sense, what is left to be filled? Would it be better to

1. refuse to convert those
2. convert but warn about lost fill
3. automatically convert such things into two objects (filled object with invisible zero width border under dotted/dashed border, convert only the latter)

What is it about arcs, spirals and stars that lets them automatically convert to paths that does not apply to rectangles? It seems odd that a "4 sided star", which in the GUI is indistinguishable from a rectangle, will convert, but the rectangle will not.

David Mathog (mathog) wrote :

I should add in passing that when PowerPoint exports a filled dotted/dashed rectangle to EMF it essentially uses method (3). EMF files do not support dotted/dashed filled objects, so PowerPoint creates an EMF which looks like it holds such an object, but is really a combination of draw operations. Since the main reason I am using convert to dashes is to get such things into PowerPoint there would be a certain symmetry if method (3) was employed. (Of course no symmetry for people who are using this feature in Inkscape for some other purpose.)

Bryce Harrington (bryce) on 2015-02-23
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers