Skip to main content
Participant
June 12, 2019
Question

Script to cut lines at intersection with frames

  • June 12, 2019
  • 2 replies
  • 881 views

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?

This topic has been closed for replies.

2 replies

Participant
June 13, 2019

Hello everyone, any initial idea on?

Silly-V
Legend
June 12, 2019

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.

Participant
June 12, 2019

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).

Silly-V
Legend
June 12, 2019

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.