Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Selecting some anchor points on a path & cutting them out

$
0
0

I would like to iterate through anchor points on a closed path. Starting at anchor [0] I'd want to measure the distance to the next anchor point [1] if absolute value is inside set limit then measure from anchor [1] to anchor [2] if inside limit same again. Essentially I wish to selecting any clusters of anchor points and cut them out of the path, and delete them. Then I want to close the remaining open path with a Join type command.

 

Wondering if there is an anchor point object accessable in the AI object methods. I'm familiar with Javascript but have very little experience with the AI DOM / objects & methods. Reading thru the docs now but this need could be a deal breaker on a larger script if I cannnot perform this kind of operation. So if you know either way please advise me!

 

I'm on CS4 OS X (10.5.8)

 

Thanks in advance

Alastair

 

Example:

 

 

Picture 1.png

Fig 1. Clusters of anchor points on path (highlighted with green ellipses) as a result
of an expanded 62 step blend that has been united with Pathfinder> Add function.                

 

Picture 4.png

Fig 2. First cluster of anchor points cut from path and deleted.

 

Picture 5.png

Fig 3.  Open path has Object> Path> Join command applied to close the path.

 

Picture 8.png

Fig 4.  All anchor point clusters removed to create a closed path
with essentially the same shape as original path.   


Viewing all articles
Browse latest Browse all 12845

Trending Articles