Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
  • extensions extensions
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 77
    • Issues 77
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Scheduled maintenance on the database layer will take place on 2022-07-02. We expect GitLab.com to be unavailable for up to 2 hours starting from 06:00 UTC. Kindly follow our status page for updates and read more in our blog post.

  • Inkscape
  • extensionsextensions
  • Issues
  • #445
Closed
Open
Created Feb 10, 2022 by Scott Pakin@pakin

Unexpected behavior from inkex.paths.Path.reverse and disjoint paths

Summary:

Invoking inkex's reverse method on a path object containing multiple disjoint segments may combine the segments.

Steps to reproduce:

  • Open the attached disjoint.svg file in Inkscape.
  • From an extension, execute the following code:
for node in self.svg.xpath('//svg:path'):
    node.path = node.path.reverse()

Alternatively, if you use my Simple Inkscape Scripting extension, run the script

for node in svg_root.xpath('//svg:path'):
    node.path = node.path.reverse()

from the dialog box.

What happened?

The path, which was originally M 128,64 L 128,128 M 128,196 L 128,256, became M 128 256 L 128 196 M 128 196 L 128 64. This is rendered as a single segment instead of two segments with an intervening gap. (Note the L 128 196 followed by a M 128 196.)

What should have happened?

It should have become M 128,256 L 128,196 M 128,128 L 128,64 (or even M 128,256 V 196 M 128,128 V 64), as is done by the Inkscape GUI when executing Path → Reverse.

Sample attachments:

disjoint.svg

Version info

Inkscape 1.2-alpha (f3d6d80, 2022-02-09)

    GLib version:     2.64.6
    GTK version:      3.24.20
    glibmm version:   2.64.2
    gtkmm version:    3.24.2
    libxml2 version:  2.9.10
    libxslt version:  1.1.34
    Cairo version:    1.17.4
    Pango version:    1.44.7
    HarfBuzz version: 2.6.4

    OS version:       Ubuntu 21.10
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking