Select objects by overlap with path

Flesh out your ideas for new or improved Inkscape features before submitting a request.
chraab
Posts: 10
Joined: Sun Mar 04, 2018 12:31 am

Select objects by overlap with path

Postby chraab » Thu Apr 26, 2018 1:56 am

Hi everyone,

I thought it would be nice to select objects that are defined by the overlap with a path. You could see it as a "lasso select", but more general since the shape does not need to be hand-drawn on-the-spot.

Use example, illustrated in the attached file: I have a complicated path, some sort of irregular pattern maybe, made of 1 or more unclosed sub-paths. I can clip it with the selected shape, but then the edges are angled since there is a non-zero stroke width. I can cut it with the selected shape, but that leaves lots of individual segments. How do I get the ones that were originally inside the shape? Right now, I need to manually select them.

This could have artistic applications. Imagine you have something that looks like an engraved hatching. You want this texture for your shape. But clipping looks wrong, because if you'd drawn the hatching inside the shape, the ends would all look roughly the same, instead of being cut off. Also, you want to be able to adjust the stroke width.
Attachments
feature_overlap_select.svg
(176.17 KiB) Downloaded 325 times

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Select objects by overlap with path

Postby Moini » Thu Apr 26, 2018 10:19 am

If you only care about the looks, then you could do 'stroke to path' and then intersect (Edit: Nonsense, would give you the same visual result as 'clip', sorry!). Else, the eraser tool isn't so bad at removing things, just keep a copy of the 'star' (or whatever) on top.

I don't know of any available method to only keep intersecting paths, maybe someone else can come up with a smart strategy...
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

chraab
Posts: 10
Joined: Sun Mar 04, 2018 12:31 am

Re: Select objects by overlap with path

Postby chraab » Thu Apr 26, 2018 11:17 pm

I didn't know the eraser tool! Using that in "delete objects" mode made it pretty convenient, at least for simple shapes. So, thank you!

I still think it would be a good feature, especially if you can switch between "any overlap", "at least half the bounding box", or "total overlap" to decide whether to select. You could fill any shape with any irregular pattern without cutting it off! This would open up vector art with Inkscape to realistic looking vector textures.

Is there anyone else who'd use a feature like this? I know that it might cause more work than just its own implementation, since there are currently several disparate ways to do this for certain special cases, which might then need to be overhauled/consolidated:

If you're happy with cutting off edges, you could use a bitmap texture and a mask. However that can drive up file size and does not export to PDF. For another special case that you create the pattern from clones of one object, both the Clonetiler "trace" function and Spray with "apply over..." settings can do it.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Select objects by overlap with path

Postby Moini » Thu Apr 26, 2018 11:28 pm

I've found myself in the situation of needing that feature a couple of times, and I've read several others asking for it, so yes, I think it's worthwhile requesting it.

Feature requests as well as bug reports go here: https://bugs.launchpad.net/inkscape
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Select objects by overlap with path

Postby brynn » Sat Apr 28, 2018 11:19 pm

There are some little known selection techniques available. I think generally referred to as "touch select" http://tavmjong.free.fr/INKSCAPE/MANUAL ... elect.html

Alt + drag mouse over the objects

Shift + Alt + mouse drag

https://inkscapecommunity.com/jd/vids/ts.mp4 (may be temporarily unavailable at some point this weekend) (too bad mp4 can't be attached)

chraab
Posts: 10
Joined: Sun Mar 04, 2018 12:31 am

Re: Select objects by overlap with path

Postby chraab » Mon May 21, 2018 2:37 am

Sadly, this won't work with window managers that already use Alt + Left mouse drag for moving windows. But I'm sure someone else will find it useful! And of course it's always good to refer to Tavmjong's site.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Select objects by overlap with path

Postby Moini » Mon May 21, 2018 8:00 am

Most Inkscape users on Linux change their window manager Alt key to something else - Alt+click is essential for using Inkscape in a swift and convenient way - we even have an FAQ item for it :)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

chraab
Posts: 10
Joined: Sun Mar 04, 2018 12:31 am

Re: Select objects by overlap with path

Postby chraab » Mon Jun 04, 2018 6:30 am

Oh, then I should have read the FAQ! I'll do that then.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Select objects by overlap with path

Postby Xav » Mon Jun 04, 2018 7:46 am

Moini wrote:Most Inkscape users on Linux change their window manager Alt key to something else - Alt+click is essential for using Inkscape in a swift and convenient way - we even have an FAQ item for it :)


I've never bothered changing mine. Instead of Alt+click or Alt+drag I use Super+Alt+Click/Drag, where Super is usually known as the Windows key. That way I don't have to change a standard Linux keybinding for the sake of one program.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Select objects by overlap with path

Postby prkos » Tue Jun 05, 2018 8:17 am

Xav wrote:
Moini wrote:Most Inkscape users on Linux change their window manager Alt key to something else - Alt+click is essential for using Inkscape in a swift and convenient way - we even have an FAQ item for it :)


I've never bothered changing mine. Instead of Alt+click or Alt+drag I use Super+Alt+Click/Drag, where Super is usually known as the Windows key. That way I don't have to change a standard Linux keybinding for the sake of one program.


I don't think this worked for me some years ago, there was no alternative but to change the Alt button behaviour. Maybe it will work now, I'll try on my next installation.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Select objects by overlap with path

Postby Xav » Tue Jun 05, 2018 5:06 pm

It's always worked for me using Mate (and, before that, GNOME 2). Perhaps a different window manager or desktop environment prevented it working for you.

It's also worth clarifying that I only need to hold the Super key if the mouse is involved. For Alt-Arrow or other Alt-plus-key combinations, just the Alt key on its own is sufficient.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter


Return to “Inkscape Ideas”