Skip to main content
Participant
December 19, 2024
Question

I need help automatically grouping different pieces into 1 group, Including small details inside

  • December 19, 2024
  • 2 replies
  • 312 views

Hello everyone. I need your help.
I am currently looking for a script that can automatically group different pieces into one group including small details inside the image. I hope everyone can help me. Any help is highly appreciated. Thank you very much!

This topic has been closed for replies.

2 replies

Kurt Gold
Community Expert
Community Expert
December 19, 2024

I once tried to write a script that was supposed to select all objects located completely inside any given closed path. It worked pretty well with simple closed paths (like rectangles and simple polygons), but it did not work reliably with more complex closed (and curvy) paths.

 

Finally I did not pursue the approach anymore because there were just too many exceptional cases.

 

I also have an action that may work in some situations, but it is not completely reliable as well.

 

However, based on your sample file I'd suggest to just take the Lasso tool to select the desired objects and group them. That's a fast way that should not take more than half a minute. Of course your sample file shows why it would be useful if Illustrator had a dedicated Polygon Lasso tool.

 

In recent Illustrator versions, another way that may somewhat work sometimes is to use the encapsulated mode while using the Selection tool.

dzai_3296Author
Participant
December 19, 2024
dzai_3296Author
Participant
December 19, 2024