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

cunning way (script ideally) to round internal corners of a shape?

Contributor ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

I'm trying to find a solution to a slightly vexing problem, I have a bunch of paths like following image where I need to smooth only the hard corners while keeping the rest of the shape as it is.

This is an example of the original shape and what I hope to end up with, where only the 'internal' corners have been smoothed.

jeffbottom_2-1712322564650.png

using the smooth tool does a great job on the cornes but also contracts and expands the other parts of the shape that i need to stay the same as the original.

jeffbottom_3-1712322637299.png

 

the closest I've come is to do a simplify by eye, then manually select the corners, then apply Hiroyuki Sato's corner rounding script. This achieves pretty much what I need to do but with quite a bit of manual tweaking and GUI interfacing, and only for a single shape. but I need to process hundreds of similar but all unique shapes, so this process isn't going to feasible.

 

jeffbottom_4-1712322871964.png

 

 

I'm really hoping someone has a cunning plan for how to appoach this... ideally a scripting solution, but even a 'select all shapes' and do some GUI steps that are applicable to all shapes at once, without having to individually tweaking settings for each and every shape...

 

any suggestions very greatly appreciated.

 

 

 

 

 

TOPICS
How-to , Scripting

Views

191

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
Adobe
Community Expert ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

Hi. This should be possible, with the Corner widgets. As long as the vector shapes are created correctly/clean.

like here: https://www.youtube.com/watch?v=8-yj9iB0Wh0

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
Enthusiast ,
Apr 06, 2024 Apr 06, 2024

Copy link to clipboard

Copied

I'm not sure I understand the details of your task. After Object > Path > Simplify for selected paths, you can try running SelectPointsByType to select sharp acnhor points (checks for handles) and round them using native Corner Widget, Hiroyuki Sato's script, or Dynamic Corners Tool by Astute Graphics. This way you don't have to select each vertex by hand.

2024-04-0709.46.07-ezgif.com-optimize.gif

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
Participant ,
Apr 08, 2024 Apr 08, 2024

Copy link to clipboard

Copied

Try the trackpad tool

 

screen_Obszar roboczy 1.jpg

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 ,
Apr 08, 2024 Apr 08, 2024

Copy link to clipboard

Copied

Jeff,

 

Maybe of little help, but you can start with the Round Any Corner, and use it (maybe in groups) with different values, or easily selecting them as Sergey said.

 

I am afraid the simplifying goes against the "while keeping the rest of the shape as it is".

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
Engaged ,
Apr 09, 2024 Apr 09, 2024

Copy link to clipboard

Copied

Recreate the action from the screenshot. This action should take care of what you need.

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
Contributor ,
Apr 14, 2024 Apr 14, 2024

Copy link to clipboard

Copied

LATEST

thanks everyone for the suggestions.

It turned out to be a rather more vexing problem than I had anticipated, mainly due to the range of possible shapes I was needing to deal with.

I went a long way down Sergey's path trying to isolate the hard corner anchors and it was going quite well but the initial simplification required to open up the point spacing kept messing with the corners of certain outlier shapes, too many to tweak manually.
BryanPagenkopf's idea of doing two opposed path offsets was very cunning and I managed to wrangle it into a script that works enough of the time to be almost universal to my process, requiring only a minimal pass over the final thing to tweak the few outliers...

jeffbottom_0-1713083459289.pngjeffbottom_1-1713083482969.png

 

generally works pretty well with smaller offsets (i.e. less rounding), keeping the original inner shapes perfectly.

The main issue is when the offset is too large for small shapes, such that the shape will disappear entirely, the first shrinking offset just doesn't happen, but there's no warning or error that it hasn't been applied, so they're really hard to catch.

jeffbottom_3-1713084517676.png

 

and the sweetspot is a bit of a moving target!  It's WAY beyond my skills (or needs) but the ideal solution would be adaptive in some way. shrinking when it need to within a specified tolerance.

the other thing I thought was interesting in this whole exercise was the 'percieved' roundness of a corner, ideally the more oblique the corner the larger its radius would be and the opposite for more acute corners so that the final shape has rounded corners that feel more natural... but that is a whole other kettle of fish...

jeffbottom_4-1713084987638.png

two corners with the exact same radius but the more acute corner feels like it's been more rounded than the oblique corner.

 

 

 

 

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