• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Removing points from the inside of a shape using scripts

Explorer ,
Jul 28, 2023 Jul 28, 2023

Copy link to clipboard

Copied

Hey all,

 

I have loads and loasd of files to cut on our laser. I have created offset paths on all of them BUT do not want to cut anything inside the outer shape (see screenshot example below).

 

Screenshot 2023-07-28 at 18.34.47.png

 

Is there a script, tool or automated bit of magic I do not know which can select and delete these bits of the shape which will save me hours please? All the shapes are different sizes with different shaped, sized and qtys of bits to delete!

 

Thanks all,

 

Joe

TOPICS
How-to , Scripting , Tools

Views

394

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Explorer , Jul 28, 2023 Jul 28, 2023

Sorry, was in a bit of a rush yesterday and didn't want you all wasting your time posting answers when I'd already figured it out.

 

So for example, if the original offset path (the size of the edge required) was 2mm but it had holes inside you wanted to remove...

 

1. You add another offset path the same size as the original offset path (another 2mm offset path in this example) so now the edge is 4mm, but the internal bits/holes will disappear in this larger path.

2. You can now delete the original

...

Votes

Translate

Translate
Community Expert , Jul 29, 2023 Jul 29, 2023

@Cakeshop 

Thank you for your feedback.

 

I would handle it similarly (as you and @sttk3). That's how I've recommended it for similar requests.

 

In most cases, it is important that there is an offset and that there are no sharp corners left.
(In the screenshots I work with a second fill, but only for better visibility.)

You need:

  • group your object (only required for the last effect)
  • An effect offset path with positive value + the "value for the rounded edges".
  • A second effect offset path with a
...

Votes

Translate

Translate
Adobe
Explorer ,
Jul 28, 2023 Jul 28, 2023

Copy link to clipboard

Copied

Don't worry all, 2 mins later I sussed this out!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 28, 2023 Jul 28, 2023

Copy link to clipboard

Copied

And what was your solution?

Script or not Script?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 28, 2023 Jul 28, 2023

Copy link to clipboard

Copied

Sorry, was in a bit of a rush yesterday and didn't want you all wasting your time posting answers when I'd already figured it out.

 

So for example, if the original offset path (the size of the edge required) was 2mm but it had holes inside you wanted to remove...

 

1. You add another offset path the same size as the original offset path (another 2mm offset path in this example) so now the edge is 4mm, but the internal bits/holes will disappear in this larger path.

2. You can now delete the original 2mm path, so you are only left with the 4mm one with no holes in it...

3. Then you add a third offset path but for -2mm to get the larger path with no holes back to the size you want, and now delete the larger offset path.

 

This can be done with a recorded action or a script 👍

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 29, 2023 Jul 29, 2023

Copy link to clipboard

Copied

It can be achieved nondestructively with Appearance: apply Pathfinder > Divide and Pathfinder > Add. The same effect continues even if you change the shape.

divide_add.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 29, 2023 Jul 29, 2023

Copy link to clipboard

Copied

@Cakeshop 

Thank you for your feedback.

 

I would handle it similarly (as you and @sttk3). That's how I've recommended it for similar requests.

 

In most cases, it is important that there is an offset and that there are no sharp corners left.
(In the screenshots I work with a second fill, but only for better visibility.)

You need:

  • group your object (only required for the last effect)
  • An effect offset path with positive value + the "value for the rounded edges".
  • A second effect offset path with a negative "value for the rounded edges" so that the sharp edges are eliminated.
  • A third effect Patfinder "Crop" eliminates the inner elements.

 

This can be saved as a graphic style. Or it can be recorded as an action or in combination with a script.
The only important thing is: they are effects. that is why you finally need to convert the appearance and possibly the pathfinder add again, so that no superfluous/disturbing paths remain in the file (check in the outline view).

 

your path - grouped

pixxxelschubser_1-1690629715410.png

 

(for better visibility here in forum with a second fill)

first effect

pixxxelschubser_2-1690629771566.png

 

second effect --> no sharp corners

pixxxelschubser_3-1690629845018.png

 

third effect --> eliminates inner shapes

pixxxelschubser_4-1690629968500.png

 

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 05, 2023 Aug 05, 2023

Copy link to clipboard

Copied

Thanks for this, yes you are right this is way better than my solution 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 05, 2023 Aug 05, 2023

Copy link to clipboard

Copied

LATEST

Very good.

😉
The most important thing is to have at least one solution. It is optimal if you can choose the best solution (for yourself) from several possibilities.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines