gotcha

Author Topic: Select islands with only one node  (Read 1045 times)

September 14, 2018, 06:04:16 AM
Read 1045 times

kronos

  • Full Member

  • Offline
  • ****

  • 56
I have an object which in edit paths by node has separated smaller parts with only 1 node.

I there a way to automatically select all of smaller parts which have only one node ?

September 15, 2018, 02:37:40 AM
Reply #1

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Interesting.  I have seen single node objects now and then.  But I have not seen a file with more than one or 2.

When you select them, does the status bar indicate any fill or stroke?  Edit menu > Find might be able to select them all at once.  I'd have to experiment to find out.  Or you might be able to find the right configuration for the Find dialog, yourself.  If you set it up right, you can use part of the XML, which you can get from the XML Editor.

If you could share the SVG file, I'd be glad to experiment.  (It could take a long time to create a test file with more than one single node, haha.)

There's another relatively new way of selecting similar objects, which is Edit menu > Select Same.  But I don't think it works by number of nodes.  If all those single node objects have the same fill or stroke color, that are different from all the other objects, it would work.

There are some little known selection techniques which might be helpful.  See the manual:  http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Select.html  (Note that the Find dialog shown in that section is the old one - the new one can do a LOT more.)
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 15, 2018, 02:44:00 AM
Reply #2

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
No, there's currently no way to select single-node subpaths.

You could break the part apart to split it up into its constituent subpaths, which would make it easier to select single parts with the selection tool. But this doesn't improve things for every case, depends on your drawing.

September 15, 2018, 05:44:28 AM
Reply #3

Lazur

  • IC Mentor

  • Online
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Interesting.  I have seen single node objects now and then.  But I have not seen a file with more than one or 2.

Test case -trace bitmap to generate a path with 10000+ nodes, then simplify path; break it apart.

September 15, 2018, 06:12:03 AM
Reply #4

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Hah!  How long do you expect it would take to trace the kind of image that would produce 10,000 + nodes?  5 or 10 minutes, I guess, depending on your system resources?

You must be thinking about tracing a photo?  Like maybe a landscape photo?
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 15, 2018, 07:13:14 AM
Reply #5

Lazur

  • IC Mentor

  • Online
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Just a regular black and white tracing of a halftone. Few minutes maybe?

September 16, 2018, 12:14:30 PM
Reply #6

kronos

  • Full Member

  • Offline
  • ****

  • 56
Interesting.  I have seen single node objects now and then.  But I have not seen a file with more than one or 2.

When you select them, does the status bar indicate any fill or stroke?  Edit menu > Find might be able to select them all at once. 


Already tried with select similar

September 17, 2018, 05:03:24 AM
Reply #7

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
No, I can't find any way to select the single-node paths in this file.  But I would suggest you take the opposite approach.  There really are only 5 to 10 large objects there.

So I would say select those few (however many you need).  Then do Edit menu > Invert Selection (which will deselect those and select all the tiny ones).  Then just delete.

First you'll need to Ungroup them.  Next Path menu > Break Apart.  Then you'll be able to select those few largest objects.
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

September 17, 2018, 07:12:25 AM
Reply #8

kronos

  • Full Member

  • Offline
  • ****

  • 56

September 17, 2018, 09:08:41 AM
Reply #9

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann