Skip navigation
Currently Being Moderated

How can I fill a shape with circles

Sep 28, 2013 5:38 PM

I'm trying to do following action using CS6 SDK:

1 Covert the selected path into chained circles

2 Fill the selected shapes with circles


All circles are of equal size, and cannot be overlapped each other.


Any reference/suggestions? thanks

  • Currently Being Moderated
    Sep 29, 2013 9:13 AM   in reply to JeromeHuang



    For the first question to replace a path by circles, you could do:

    Get the length of the path with the MeasureSegments function in AIPath.h.

    Calculate the centers positions. Divide the length of the path by the number of circles and use functions like

    GetPathBezier (from AIPath.h) and TAtLength, PointAndTangent (from AIRealBezier.h).

    When you have the positions of the centers, you create the circles.

    FromCapture d’écran 2013-09-29 à 18.10.03.pngtoCapture d’écran 2013-09-29 à 18.09.51.png


    To fill a shape with circles, I have no idea.


    Mark as:
  • Currently Being Moderated
    Oct 7, 2013 7:33 AM   in reply to JeromeHuang

    Can you use a pattern brush and fill pattern? If I understand your problem correctly a brush would "replace a path" and a fill pattern would "fill a shape." You could create these assets in the document or perhaps have your plugin create them. Then have the plugin apply them to the path.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points