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

Creating Arcs by Center, Radius, and Arc angle

New Here ,
Mar 08, 2011 Mar 08, 2011

Copy link to clipboard

Copied

Is there a way to create (script)  an arc by center, radius and arc angle?  or by 3 points?

By arc i mean a regular arc, as in a piece of a circle.  It seems the native illustrator tools make it very difficult to create a regular arc in the normal CAD way of drawing one.  I found a forum post from a guy years ago that said he had created script to make arcs this way.  Have you come across this anywhere? Any ideas?

Thanks,

TOPICS
Scripting

Views

2.3K

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 , Mar 08, 2011 Mar 08, 2011

There is a sample, create an arc.

var lnColor = new GrayColor;

lnColor.gray = 100;

var r =100; //radius

var ln = app.activeDocument.pathItems.add ();

ln.stroke = true;

ln.strokeColor = lnColor;

ln.strokeWidth = 0.3;

ln.filled =false;

var pt = ln.pathPoints.add()

pt.anchor = Array(0, 100);

pt.rightDirection = Array((Math.sqrt (2)-1)/3*4*r, 100);

pt = ln.pathPoints.add();

pt.anchor = Array(100, 0);

pt.leftDirection = Array(100, (Math.sqrt (2)-1)/3*4*r);

Read below article.

Way to tell perfect circle from an ellipse?

...

Votes

Translate

Translate
Adobe
Community Expert ,
Mar 08, 2011 Mar 08, 2011

Copy link to clipboard

Copied

LATEST

There is a sample, create an arc.

var lnColor = new GrayColor;

lnColor.gray = 100;

var r =100; //radius

var ln = app.activeDocument.pathItems.add ();

ln.stroke = true;

ln.strokeColor = lnColor;

ln.strokeWidth = 0.3;

ln.filled =false;

var pt = ln.pathPoints.add()

pt.anchor = Array(0, 100);

pt.rightDirection = Array((Math.sqrt (2)-1)/3*4*r, 100);

pt = ln.pathPoints.add();

pt.anchor = Array(100, 0);

pt.leftDirection = Array(100, (Math.sqrt (2)-1)/3*4*r);

Read below article.

Way to tell perfect circle from an ellipse?

and I think, you'd better read this page.

http://en.wikipedia.org/wiki/B%C3%A9zier_curve

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