CircleFill won't fill with circles – or anything else

LEGEND ,
Oct 31, 2016 Oct 31, 2016

Copy link to clipboard

Copied

Does someone have the time to track down what the possible problem could be with my CircleFill script? See [Ann] Design effect - image made of perfectly arranged circles​.

As lisapru notes (see down that thread), it fails to work on a background slab with the text punched out. Not only does it 'not work', but it also does so silently; no error, no warning, no change, and nothing in the Undo stack either.

TOPICS
Scripting

Views

1.4K

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Oct 31, 2016 Oct 31, 2016

Hi [Jongware]​,

if I understand you right, sometimes your script fails without an error if an outlined text was substract from a rectangle?

If the text was outlined you have to release the group at first. After than you can create the final compound path with your background rectangle. The script works correctly for me.

FillCircle.png

--------------------------------------------

But if you create the (final) compound path with

- a group of outlined compound paths

- and your backgroud rectangle,

your script fails. Som

...

Likes

Translate

Translate
Community Beginner , Aug 03, 2022 Aug 03, 2022

All the solutions provided above still refused to work for me.
However after a days struggle and trying various permutations I think I've got a solution that can work for those of you thatare still struggling to get this to work.

1. Go to your layers pallette and UNLOCK ALL the layers.

2. The go to Layer Panel Options and select the 'Show Layers Only' option

3. Remember to select SMALL

Now run the script.

Thank you Jongware this is priceless and truly generous of you to share here for free.

 

Best,

Fred

 

...

Likes

Translate

Translate
Community Expert ,
Oct 31, 2016 Oct 31, 2016

Copy link to clipboard

Copied

Hi [Jongware]​,

if I understand you right, sometimes your script fails without an error if an outlined text was substract from a rectangle?

If the text was outlined you have to release the group at first. After than you can create the final compound path with your background rectangle. The script works correctly for me.

FillCircle.png

--------------------------------------------

But if you create the (final) compound path with

- a group of outlined compound paths

- and your backgroud rectangle,

your script fails. Sometimes Illustrator crashes. I don't know why. Mostly the mistake seems to be in line #218

if ( innerpaths[0][0] < innerpaths[innerpaths.length-1][0])

undefined is not an object

Perhaps this helps you a little bit.

Regards pixxxelschubser

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 31, 2016 Oct 31, 2016

Copy link to clipboard

Copied

I got some pretty inconsistent results, but I don't think it depends on whether the text was grouped or not before punching it out. I got the same error at that line, and ... wow. It's a mistake – and it's a biggie

Look:

if ( innerpaths[0][0] < innerpaths[innerpaths.length-1][0])

The idea here is to check the first point of a path against the last one. The paths themselves are the first array index, the next is the line index, and, if I remember correctly at least, the third one is the point itself. Now look at the part I bolded. It uses the length of innerpaths itself – not that of the nested array ...

It should be

if ( innerpaths[0][0] < innerpaths[innerpaths.length-1][0])

– see? The length of the sub-array, not of the parent...

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 01, 2016 Nov 01, 2016

Copy link to clipboard

Copied

Hi [Jongware]​,

Glad I could help and glad i could give you back a little. Give and take relationship.

(But I only pointed you to the right direction) you found the mistake by yourself.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 03, 2022 Aug 03, 2022

Copy link to clipboard

Copied

LATEST

All the solutions provided above still refused to work for me.
However after a days struggle and trying various permutations I think I've got a solution that can work for those of you thatare still struggling to get this to work.

1. Go to your layers pallette and UNLOCK ALL the layers.

2. The go to Layer Panel Options and select the 'Show Layers Only' option

3. Remember to select SMALL

Now run the script.

Thank you Jongware this is priceless and truly generous of you to share here for free.

 

Best,

Fred

 

 

FredAR_0-1659512522059.png

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines