Motion extension ignores 'z' segments

Bug #542260 reported by uwesch
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

The extension 'motion' ignores paths closed with a 'z'. Especially Fonts on the OS Windows which are converted to paths are closed with a 'z'.
Draw a Letter
Convert to path
set the motin extension
--> some shapes wont be created.

Linux and OSX are different converting paths from letters. There the letters are not closed with a 'z' and the extension is working fine.

Other example:
Draw three segments with the Beziér tool
use the extension and everything is fine
Put a 'z' (to close) on the path in the XML editor. Use the extension again and only two shapes are created instead of three.

Update: Tested with Windows 7 and R9213
Xubuntu 9.10 with R9195

Revision history for this message
uwesch (uwesch) wrote :
description: updated
uwesch (uwesch)
description: updated
su_v (suv-lp)
tags: added: extensions-plugins
Revision history for this message
su_v (suv-lp) wrote :

another example (Inkscape 0.47+devel r9210 on OS X 10.5.8)

Changed in inkscape:
status: New → Confirmed
Revision history for this message
su_v (suv-lp) wrote :

difference win32 / osx of character 'A' (font: Arial) converted to path

Revision history for this message
Chris Mohler (cr33dog) wrote :

Quick patch that causes simplepath.py to append the last 'L' segment when parsing paths.

Revision history for this message
Chris Mohler (cr33dog) wrote :

Oops - this patch breaks the dots.py extension (Number Nodes).

Revision history for this message
Chris Mohler (cr33dog) wrote :

Per IRC discussion, some quick fixes for the dots.py script:
 - fix division by zero
 - remove extra node at start/end
 - option to preserve path
 - starting circle slightly larger than the rest

This patch depends on the one above - without it, linear shapes will be missing the circle marker for the penultimate node.

Revision history for this message
su_v (suv-lp) wrote :

Inkscape 0.47+devel r9456 including the three patches
- bug #202540: <http://launchpadlibrarian.net/49235570/csp_03.patch>
- bug #542260: <http://launchpadlibrarian.net/49237636/simplepath_z_fix_01.patch>
- bug #542260: <http://launchpadlibrarian.net/49242371/dots_01.patch>
(tested both with personal and default preferences file)

1) 'Motion' now honors a closing 'z' segment, but creates a 'null' face for the closing 'z' of a curved path (see 3).

2) 'Number Nodes…' works as expected with paths like
- rectangle/star/polygon converted to path
- path closing with a straight line segment (pen tool / node tool)

3) 'Number Nodes…' adds an extra point when numbering closed paths like
- ellipse/circle converted to path
- star/polygon with rounded corners converted to path
- closed curve drawn with pencil tool
- path closing with a curved segment (pen tool / node tool)

Because now coinciding start and end nodes are not longer rendered offset but on top of each other, it can be difficult to notice that 'Number Nodes…' counts one more node than is displayed in the status line message about the selected path.

I haven't tested other extensions which are importing cubicsuperpath.py and and simplepath.py.

Revision history for this message
su_v (suv-lp) wrote :

further notes to my previous comment:

ad 2): this has changed since 0.47: revision 9076 and 9079 added 'prevent a redundant closing line segment' when converting a rectangle, star or polygon to path and when creating a path with the pen (bezier) tool.

ad 3): this is the same behavior of the 'Number Nodes…' extension as previously in 0.47: all paths listed in 2) have numbers for both (coinciding) first and last nodes.

Actually the number of nodes in a 'closed' path is ambiguous because the last redundant node is hidden from the user (e.g. in the node tool or in the status line messages) if it coincides with the first node and a 'z' command closes the path.

Revision history for this message
su_v (suv-lp) wrote :

regression with sub-paths ('Motion' in Inkscape r9456+patches, Python 2.6.2)

Revision history for this message
Chris Mohler (cr33dog) wrote : Re: [Bug 542260] Re: Motion extension ignores 'z' segments

On Fri, May 28, 2010 at 7:27 AM, ~suv <email address hidden> wrote:
> further notes to my previous comment:

Thanks for taking the time to comment on these.

> ad 2): this has changed since 0.47: revision 9076 and 9079 added
> 'prevent a redundant closing line segment' when converting a rectangle,
> star or polygon to path and when creating a path with the pen (bezier)
> tool.

Yes - I think that this change in Inkscape is the reason that some
extensions are having problems now. Most of what I've noticed
(fractalize, motion) stems from simplepath.py not being aware of the
closing 'Z'. You sent me that regression svg of sub-paths also - I'll
take a look into it.

> ad 3): this is the same behavior of the 'Number Nodes…' extension as
> previously in 0.47: all paths listed in 2) have numbers for both
> (coinciding) first and last nodes.

Interesting. I'll look into this as well.

Today is going to be a hectic one for me, but I will try and pin these
items down over the weekend.

Thanks,
Chris

su_v (suv-lp)
Changed in inkscape:
importance: Undecided → Medium
Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

This issue has been resolved in Inkscape 1.2 by MR https://gitlab.com/inkscape/extensions/-/merge_requests/317.

Closed by: https://gitlab.com/jhofinger

Changed in inkscape:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.