I use Illustrator for drawing comics and I'd like to speed up the process with help from Scriptographer. I'll usually draw the lines through and remove the overhanging bits either with the Scissors Tool or the Pathfinder Outline, both of which are annoying to work with for so many paths.
[illustration1]
This is the functionality I'd like to create with Scriptographer: I select all relevant paths and draw a line through the part I wish to have removed.
[illustration2]
This is what my script does so far.
- onMouseDrag I draw a path.
- onMouseUp I check which selected paths intersect with the path I just drew.
- I check where these paths intersect with other selected paths.
- I weed out all intersections that are not right next to an intersection with the path I just drew and store the remaining data in a variable.
- Then I would like to split the paths at these intersections.
Problem is: When I've split a path once, how do I split the remaining bit? The curveLocations I've gathered no longer apply to the new path.
[illustration3]
Any ideas how to solve this? Can I do multiple splits in one command?