Copy link to clipboard
Copied
I need a script for Illustrator that does the following:
To Illustrate what I mean see the picture:
and this follows, depending on the amount of paths inside each other.
Does anyone knows how to solve this?
Thank you in advance!
Copy link to clipboard
Copied
I need a script for Illustrator that does the following:
To Illustrate what I mean see the picture:
and this follows, depending on the amount of paths inside each other.
Does anyone knows how to solve this?
Thank you in advance!
Copy link to clipboard
Copied
Is doing it by hand an option?
- select all your circles
- grab the Shape Builder Tool
- puch holes with it
- apply PathFinder Unite
- ungroup
- release Compound Paths
Carlos
Copy link to clipboard
Copied
Hey Carlos,
doing by hand is not an option because I need to edit hundres of vector data and this would take me a lot of time to do everything manually.
Copy link to clipboard
Copied
Which version of Illustrator are you using?
Also, in cases like this one it is often recommendable to provide at least one meaningful sample Illustrator file (.ai) to demonstrate a representative situation. This way, it is much easier to brood about possible automated ways.
Copy link to clipboard
Copied
I am using the lastest Illustrator version.
I need an automated way of doing this since I am not editing one file specifically but figuring out how to edit hundreds of files.
Paths need to be organised this way I've described because it will be used for laser marking and the software for that reads the data this way for correct lasermarking.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
var d1 = prompt("diameter (in points) of outer circle");
var n = prompt("number of circles");
var d = app.activeDocument.artboards[0].artboardRect;
var paths = app.activeDocument.pathItems;
var direction = false;
for (var i = 0; i < n; i++) {
var d2 = (d1/n) * (n-i) ;
direction = !direction;
var circle1 = paths.ellipse(d[3]/2+d2/2, d[2]/2-d2/2, d2, d2, direction);
circle1.stroked = true;
circle1.filled = false;
}
Copy link to clipboard
Copied
Femkeblanco, do you think that your approach is a reliable way without checking a sample file?
I'm not sure.
Copy link to clipboard
Copied
I agree. It's a shot in the dark.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Clint Eastwood had some good shots in the dark some years ago.
But he was always careful and clear-sighted.
Nonetheless, your snippet is very good.
Copy link to clipboard
Copied
Hi Kurt, Like I said in the previous comments,
I will be editing hundreds of different vector files, and I need to be able to follow this "logic" I've described above.
Outer Path must follow clockwise. First inner paths must follow counterwise, and so on and on.
See an example 😄
Copy link to clipboard
Copied
https://we.tl/t-DQwWveLHb3v Here is the example file of what I described above