Jun 18, 2009

Generate Handles

Here is a script which generates handles suitably for each selected pathes. Generated handles are extended at right angle to the line connecting the anchor and the center of the path.


Notes about anchor-points / handles in Illustrator scripting:
  1. A path is called "PathItem" in the script. And an anchor point is called "PathPoint". Every PathPoint has its own index number. It depends on the point which started drawing. Even the shapes drawn with the tools other than Pen tool have the order of PathPoints.
  2. Handles are called "rightDirection" and "leftDirection" in the script. And "right" and "left" don't mean the actual direction of them. It just depends on the direction of drawing.

It would be better if it had a preview. But you can adjust the length of the handles by selecting segments and resizing it. Here is an example of the operation.

video

download: b_aics_script_generate_handles.zip

No comments:

Post a Comment