Inkscape.org
Beyond the Basics Union fails selecting multiple paths
  1. #1
    mih mih @mih

    I'm having a strange problem combining objects that look to be paths as far as I can tell. 

    I successfully selected all items and converted Strokes To Paths via the Path menu. 

    I then selected all parts and ungrouped. When selecting everything, the Ungroup is not an option in the right click mouse menu. That should mean nothing is in a group. 

    When I try to Union via the menu or the keyboard shortcut, Union fails. There is no message why it fails, the status bar doesn't change. Nothing happens. 

    Union only works by selecting each path individually. I cannot drag a box, selecting parts and then apply Union. 

    I looked at the selection setting in Preferences and did not see anything obvious that might correct this. 

    Is this an undocumented feature of selection? I cannot figure out why dragging all the strokes and applying Stroke to Path works, while selecting all the paths, Union does not work. 

    Example file attached. 

    Union Broken
  2. #2
    David248 David248 @David248
    *

    I would open object's panel to be sure to check if there are no groups left.

    Edit : took a look at the svg file : path299 and path63 are weird paths (their d attribute in xml editor seems broken). 

    If you deselect or remove them, it works. 

  3. #3
    Aero Aero @Aero◻️

    Seems like a bug.

    Those zero length paths should render as dots like they do in browsers.

    If you replace Z with v0 they show up in Inkscape.

  4. #4
    Paddy_CAD Paddy_CAD @Paddy_CAD
    *

    I disagree that it's a rendering bug, but single node strokes should be discarded by the boolean operation.

    This path object will not be rendered.

    <path d="M 10 10" fill="none" stroke="black" stroke-linecap="round" />

    But this one will.

    <path d="M 10 10 h 0" fill="none" stroke="black" stroke-linecap="round" />

    Inkscape will render zero-length paths, but not single node paths. SVG requires at least two connected nodes to render a segment. The second node (h 0) is horizontally zero distance from the first so the stroke itself has no length and only the line caps are rendered.

    https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorials/SVG_from_scratch/Paths

     

  5. #5
    Aero Aero @Aero◻️

    The sample file renders 2 dots in both Chrome and Firefox. The status bar in Inkscape do report those paths as paths with 1 node.

    Create this in Inkscape:
    Draw a line using 2 nodes. Use stroke width 10mm and round cap.
    The status bar reports Path 2 nodes. A line is rendered.

    Make a duplicate and snap the second node to the first node.
    The status bar reports Path 1 node. A dot is rendered.
     

  6. #6
    Paddy_CAD Paddy_CAD @Paddy_CAD

    The browsers will render a one node path as a dot, but as far as I can tell, it's not SVG compliant and should be ignored.

    Aero

    Make a duplicate and snap the second node to the first node.

    There's a second node here even though the select tool reports only one. The status bar says "Path 1 node in Layer 1". Switch to the node tool and select all. The status bar changes to "2 of 2 nodes selected". Also the XML editor shows two nodes.

     

  7. #7
    Aero Aero @Aero◻️
    *

    Maybe try two new paths, this time with more nodes. Should they render the same in browsers and Inkscape?

    In my initial post I was talking about zero length, not number of nodes.

    d="m 60,10 v 0 m 10,10 v 0 m 10,10 v 0"
    d="m 80,10 z m 10,10 z m 10,10 z"

    Edit:
    You can even combine those two paths into one. Inkscape only renders half of it.

    Combined
Inkscape Inkscape.org Inkscape Forum Beyond the Basics Union fails selecting multiple paths