Skip to main content
Participant
January 23, 2020
Answered

Script puzzle.. I need a volunteer!

  • January 23, 2020
  • 4 replies
  • 797 views

Wonder if anyone has the time to take a look at this? I'm not sure if links are allowed here, but if you google "github illustrator veronoi", one of the scripts:  voronoi_from_selection.jsx

is giving me puzzling results. If I make a simple shape and select all, and run the script. I get veronoi cells as the output, but within each cell is a circle. Wonder if you could reproduce this and perhaps figure out why. This makes what I'm trying to achieve such a headache as to eliminate all these little circles on a complex image would take ages..

Thank you. Here's an example:

 

This topic has been closed for replies.
Correct answer Ton Frederiks

If you know the size of the little circles, you may use a script to select them and delete the selected items.

https://github.com/johnwun/js4ai/blob/master/SelectPathsBySize.jsx

4 replies

Ton Frederiks
Community Expert
Ton FrederiksCommunity ExpertCorrect answer
Community Expert
January 23, 2020

If you know the size of the little circles, you may use a script to select them and delete the selected items.

https://github.com/johnwun/js4ai/blob/master/SelectPathsBySize.jsx

nackjichAuthor
Participant
January 24, 2020

That has solved it for me..thanks very much !!

What a script by John Wundes.. 500+ lines of code. 

If I select all objects less than 9 pixels I can then copy just the lines on to a new layer. Wonderful.

Thanks again..

Ton Frederiks
Community Expert
Community Expert
January 24, 2020

Glad to hear that helped.

nackjichAuthor
Participant
January 23, 2020

Yes I never thought to search google images for an example. I feel silly now! Maybe I could modify the code such that the circles are not drawn. If I use a simple object I can watch the process and the lines are drawn first with the circles added at the end. Programming is not my best skill, but maybe I can "rem" a line at a time until it stops doing that . Ton that would be my next option..thanks.

Ton Frederiks
Community Expert
Community Expert
January 23, 2020

Maybe you can select one of those circles, select Start Global Edit an hit Delete

meganchi
Legend
January 23, 2020

Here is an explanation I found...

a Voronoi diagram is a partition of a plane into regions close to each of a given set of objects. In the simplest case, these objects are just finitely many points in the plane. For each seed there is a corresponding region consisting of all points of the plane closer to that seed than to any other.

 

It seems that is how the script was built.