Script to cut lines at intersection with frames
Copy link to clipboard
Copied
Good morning everyone, I would like to know if you can help me in a problem.
I am trying to create a script to cut lines that intersect with rectangles.
Is it possible to do this type of script? If so, which commands should I use?
Explore related tutorials & articles
Copy link to clipboard
Copied
This really depends on your specific case, but it may be possible by leveraging the "Divide" pathfinder operation (you have to have those in an Action that you run via script). Before trying to make a snippet of test code, I'm sure everyone wouldn't mind seeing at least a screenshot of your artwork on the artboard and layer structure for it.
Copy link to clipboard
Copied
So that's what I'm trying to do: I work in a company that does a bus, and for that, whenever we're going to paint it, it's necessary to create "paint masks", which would basically be "ways" to make it possible paint the drawing correctly.
Each paint mascara is made in one frame, and all lines within that frame need to be trimmed.
Currently this is done manually (cutting line by frame line).
In the image, it shows the drawing (lines) and the frame.
What I would like to do is: Create the frames throughout the car's extension and later run the script that would automatically cut those lines (if possible).
Copy link to clipboard
Copied
This looks great, unfortunately I'm so busy at this week that I won't be able to really do much about it, but I believe one of our residents of this forum could craft just the right workflow for you.
At the outset, I think my first step would be to ensure the lines are duplicated as many times are there are boxes, and each gets stacked and grouped in such a way that a Divide operation could create close to the result you want.
Copy link to clipboard
Copied
I accept any and all help.
I've never done any script for the illustrator, so I do not have much idea of ​​the operation, or the programming itself to be done.
But I think with a little help, I'll be able to finish this script.
Copy link to clipboard
Copied
I forgot to send it, but this is the expected end result. The lines cut and grouped within each frame (the issue of grouping is less, the X of the matter is in fact the cut of the lines)
Copy link to clipboard
Copied
Hello everyone, any initial idea on?

