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

Find and replace shapes at different rotations.

New Here ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

I have a task that requires that I take hundreds of rounded triangles and replace them with regular triangles. The sizes are all the same, but the rotations change. Select > Same works to select all of the associated triangles, but is there a method for putting each triangle in at the right location and rotation automatically?

TOPICS
Draw and design

Views

283

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 1 Correct answer

Community Expert , Nov 26, 2020 Nov 26, 2020

You can download and unzip the file below:

 

https://drive.google.com/file/d/1eY8AVXNryBsMrcagIpaMpvBw9V9xb_Yg/view?usp=sharing

 

It contains a sample Illustrator file (no_triangles.ai) that is using the objects you provided in your sample and it contains an action file (closed_triangle_maker.aia).

 

Instructions:

 

  • In the Actions palette flyout menu, load the action set "closed_triangle_maker.aia"
  • Open the file "no_triangles.ai"
  • Select all and start the action in the Actions palette

 

Votes

Translate

Translate
Adobe
Community Expert ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

defaulty,

 

I imagine that the actual change from rounded triangle to sharp triangle through a script could be the key to a script solution.

 

Obviously, it is crucial to know whether the former kind is an ordinary/expanded rounded triangle with two Anchor Points at each corner or live.

 

With that information I hope one/some of our scripter friends might take a look.

 

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
New Here ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

triangles1-01.jpg

Unfortunately, they are kind of jagged and compressed, but still vector outlines. Circled triangle is what I want them to look like.

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 ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

Are they live shapes?

Or just paths?

 

If they are live shapes, in the transform panel just set the corner rounding to 0

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
New Here ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

They are paths, unfortunately.

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 ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

Can you convert them to shapes via Object >Shape>Convert to shape?

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
New Here ,
Nov 25, 2020 Nov 25, 2020

Copy link to clipboard

Copied

It replies with "7/7 objects not converted."

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 ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

default,

 

As far as I can see, you can do it for all rounded triangles in one go using a combination of two existing scripts, and then a bit. I can only give you the name and link for one of them, but I am sure someone can supply those for the other one.

 

And someone can collect the rest of the steps into a third script (everything could be collected into one script, but I believe that would be inappropriate.

 

The following steps can be used:

 

0) If needed: lock other paths if any, such as the sharp triangle in your screenshot;

1) Ctrl/Cmd+A to select everything and apply the Cut at Selected Anchors script, see link below, then Ctrl/Cmd+A again;

Now you have open paths of everything;

2) Deselect (you can click an empty spot on the Artboard) and apply the other script, which selects paths that are shorter than a certain length (choose a length that is shorter than the side length but longer than the length of the rounding), then delete these short paths;

The rest

3) Ctrl/Cmd+A, then Object Transform>Transform Each> Scale both vertically and horizontally by a sufficient % such as 120% (so that the straight paths (former segments) cross for each triangle but no crossing with other triangles, the % depends on the rounding;

4) Ctrl/Cmd+A and Pathfinder>Divide, then Shift+Ctrl/Cmd+G to Ungroup;

5) If needed: unlock any locked paths (no harm in doing that even if there is none).

 

3) - 5) can be done with the third script.

 

The Cut at Selected Anchors script is in this free bundle of scripts (by 佐藤浩之, Satō Hiroyuki),
http://shspage.com/aijs/en/

Can someone supply the other script?

 

Can someone create the third script?

 

There may be other ways.

 

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 ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

Which version of Illustrator are you using?

 

Also, can you share this Illustrator file (.ai)?

 

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
New Here ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

https://www.dropbox.com/s/xir3peffaztxkq1/triangles.ai?dl=0
While I cant provide the Ai itself, I can share a few sample triangles, including a triangle I want to replace them with.

I am using the most recent CC

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 ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

It can (mostly) be done with an action.

 

Some further questions:

 

  • In your sample file the "triangles" are not closed paths. Is that always the case?
  • Are the dimensions of the "triangles" always similar to the ones in your sample file?

 

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
New Here ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

They are always vaugly triangular shapes made up of three closed paths, generally one angle and one side.

There are other triangles, but they are all of uniform sizes.

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 ,
Nov 26, 2020 Nov 26, 2020

Copy link to clipboard

Copied

LATEST

You can download and unzip the file below:

 

https://drive.google.com/file/d/1eY8AVXNryBsMrcagIpaMpvBw9V9xb_Yg/view?usp=sharing

 

It contains a sample Illustrator file (no_triangles.ai) that is using the objects you provided in your sample and it contains an action file (closed_triangle_maker.aia).

 

Instructions:

 

  • In the Actions palette flyout menu, load the action set "closed_triangle_maker.aia"
  • Open the file "no_triangles.ai"
  • Select all and start the action in the Actions palette

 

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