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

Converting multiple shapes to relatively-sized perfect circles?

Explorer ,
Jan 01, 2011 Jan 01, 2011

Copy link to clipboard

Copied

I have a composition with hundreds of different sized rectangles I'd like to convert to perfect circles of the same relative size as the original rectangular shapes. The 'convert to ellipse' command doesn't quite get me there as the results are not perfect circles, rather they are ovals.

Any advice is much appreciated.

Happy New Year!

TOPICS
Scripting

Views

2.1K

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 ,
Jan 01, 2011 Jan 01, 2011

Copy link to clipboard

Copied

1. apply Convert to Shape...Ellipse Effect, this example has 0 Extra Width/Height, Relative.

ConvertToEllipse.PNG

2. make 1 copy and rotate it 90 degrees, using the Transform Effect

ConvertToEllipse2.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
Guru ,
Jan 03, 2011 Jan 03, 2011

Copy link to clipboard

Copied

LATEST

You may want to see if this is what you want? It's only for the first path item… The relative size is area (approx).

#target illustrator function main() {      if (app.documents.length == 0) {           alert('Open a document before running this script');                return;      } else {           var docRef = app.activeDocument;           with (docRef) {                if (pathItems.length == 0) {                     alert('No Path Items');                     return;                } else {                     var pVB = pathItems[0].visibleBounds;                                          var pVC = (pVB[2]+pVB[0])/2;                     var pHC = (pVB[1]+pVB[3])/2;                                          var rad = Math.sqrt(pathItems[0].area/Math.PI);                                          pathItems.ellipse(pHC+rad,pVC-rad,rad*2,rad*2,false,true);                                          redraw();                }                     }      } } main();

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