Improved cut path Inkscape extension

Inkscape has a cut path feature, but it is lacking if you want to exclude what’s outside the original shape. It just cuts the path and leaves all of the fragments. I’ve long wanted to be able to easily just keep the interior paths.

If you’ve been following my recent topics, you might see that I am trying to tackle some issues with engrave fill patterns. I wrote up a very manual attempt at this here, a long time ago:

The problem always was that it was very time consuming to cut the paths and remove the parts you didn’t want – that’s where this extension comes in.

Here's how to use it:

Install the extension.

  • Make two paths, and select them both.
  • Generate from Path->Improved cut path

It’ll cut the bottom path with top path, and discard anything outside the upper path. It also preserves the upper path, which cut path does not. It also preserves the color of the two paths, so you can decide ahead of time if you want the paths to be different colors, and therefore different Glowforge steps.

Click to see a few examples of what it can do:

It can also handle pretty heavy jobs, this is at an effective resolution of 200 lpi I believe:


And you can even use it to exclude shapes with a little extra prep:

Want to try it out? Give it a try:

better_cutter_v0.03b.zip (6.9 KB)

This is largely untested, I’m just one guy with one setup. Please try it out and let me know how it goes.

26 Likes

Thinking of all the dozens, if not hundreds of hours I’ve spent cleaning up images or unwanted path segments… :grinning:

14 Likes

Right?

I finally had enough.

10 Likes

Here’s a practical workflow:

2 paths:

Stroke to path on the outline, then break apart and set fill none and stroke to a color:

Group and align the paths:

Ungroup, set color for the inner shape:

Do the improved cut path extension… It eliminated over 1200 path segments for you. 4 seconds and change, not bad:

And voila. Ready for scoring.

18 Likes

This is cool!! Thanks!

8 Likes

Thank you. Very cool and useful.

8 Likes

Exactly what was consuming too much of my time (for the 1000th time) when I thought I’d look at what everyone was doing. Perfect timing, thank you!

11 Likes

Again thank you @evansd2 for contributing knowledge to elevate the quality of our designs with the :glowforge:

10 Likes

Apologies for not being more familiar with Inkscape. Isn’t a mask or clipping path the same thing?

6 Likes

The glowforge doesn’t pay attention to masks. This is required if you are going to score just the area.

Unless that has changed since I last tried it…

7 Likes

Got it. Inkscape, like Illustrator includes the clipping path when exporting, instead of discarding it.

And I guess a boolean cut doesn’t work on an open path.

6 Likes

bwente, post:11, topic:138421
“A boolean cut doesn’t work on an open path.”

It does. Path → Cut Path does exactly that, but it leaves all the bits behind.

Here’s the difference:

Start with two pairs of paths:

  • A spiral that has been Path → Object to Path (to make it a path).
  • A rectangle that has been converted to a path.
    Control + Shift + C, all you Inkscapers. Memorize that one.

Now we apply a traditional Path → Cut Path on the left pair and a Generate from Path → Improved Cut Path (ICP) on the right pair.

  • The one on the left was cut (and the green path destroyed in the process).
  • Sorting through to get the segments you want is difficult. Here it is with everything selected, so you can see it was indeed sliced into multiple pieces.

For a rectangle, sure, you can probably rectangle-select or, if you’re particularly fancy, use Alt-Click-Drag for freehand selection…

But what if you’re working with something more complex than a rectangle?

ICP:

With the green outline removed:

This would be a total pain to manually trim. ICP for the win!

8 Likes

That’s a great solution for Inkscape users.

4 Likes

I feel like this should be the default behavior in Inkscape and am slightly puzzled it’s not.

…I wasn’t puzzled before, but I am now.

4 Likes

I think there are use cases for both actions.

3 Likes

I’m thinking Shape Builder does this for Illustrator users, but I could be wrong. Looks like a brilliant solution for Inkscape!

7 Likes

I really need this sometimes - thanks!

6 Likes

You are amazing. Thank you so much for always making things easier for the rest of us!

6 Likes

I’m not an illustrator user so I can’t say for sure but the Inkscape shape builder is really different, more like a very fluid way to do selective unions on intersecting shapes.

I could see how it might be useful but have yet to need it. If your workflow routinely required multiple unions and differences and exclusions to make a single shape then the shape builder would streamline that in a really intuitive way.

Or, if the Booleans just don’t stick in your brain then the shape builder is a much simpler system. Booleans make a lot of sense to me but I know not everyone finds it easy to keep them straight.

5 Likes

I’m usually a pretty logical person, but I was just never able to wrap my head around the way Inkscape does things. Maybe it’s because my experience with Illustrator goes about 25 years back. But like you say, the Shape Builder does make it fluid, intuitive, and visual. I like that.

5 Likes