What is Circles on Curves?

Circles on Curves is a macro that, at its most basic, creates circles, with the location of those circles based in part on the outlines of selected curve shapes.

The size of the circles is specified by the user. The locations of the circles are based on (1) the outlines of selected curve shapes and (2) spacing settings specified by the user.

The details of how this can be done, and the consequences - the variety of tasks that can be accomplished using the macro - are of course more involved!

See Circles on Curves in use:

Demo 01 - simple circles on open curves:

Demo 02 - use some lateral scatter:

Demo 03 - overlap and weld:

Demo 04 - closed curve shapes (flowers):

Demo 05 - revision cloud:

Demo 06 - pseudo-3D string (worms, noodles...):

Demo 07 - text outlined by circles:


Demo 08 - scalloped edges:

Screenshots:

Circles(?), Spacing, and Lateral Scatter.

In many cases in this description, the word "circle" will refer not to a circular CorelDRAW Ellipse, but to a closed curve that describes the shape of a circular ellipse.

When figuring the locations for circles, the macro evaluates individual subpaths of curves.

  • A circle is located at the start node of the subpath.
  • If the subpath is open, then a circle is located at the end node of the subpath.
  • Circles are located at all cusp nodes of the subpath.
  • Along the subpath, between the locations already described, circles are located evenly spaced, with the spacing settings specified by the user used to determine the maximum spacing distance.

If a non-zero lateral scatter has been specified, then a circle can be randomly (within specified limits) offset laterally with respect to the direction of the subpath at the calculated location point on the subpath.

Overlap and Free Modes.

There are two general modes for positioning circles, accessible through the tabbed user interface.

In Overlap mode, spacing is specified as a percentage of the circle diameter, and is limited to a maximum of 99%. Lateral scatter is specified as a percentage of the circle diameter, and is limited by the spacing percentage. The smaller the spacing percentage is, the larger the allowed lateral scatter. These limits are intended to ensure that each circle overlaps the circle or circles immediately adjacent to it.

In Free mode, spacing can be specified either as an absolute distance, or as a percentage of the circle diameter. Lateral scatter is specified as a percentage of the circle diameter.

Using the macro.

Basic use of the macro involves selecting one or more curves, then clicking on one of the "Create Circles..." buttons.

Create Circles just creates circles. If Use Ellipses is checked, then ellipses are produced rather than 4-node curves. Use red circles at Start and Cusp nodes causes the circles at subpath start nodes and cusp nodes to be created with red outlines. This can be useful as a diagnostic for understanding what is going on with the macro, by helping one to identify those curve features that are being used to determine the locations for the circles created.

Create Circles, then Weld creates the circles (4-node curves), then Welds them. Break at all Cusp nodes can be used to set the stage for subsequent operations that would be applied based on subpaths, e.g., Artistic Media effects.

Create Circles, then Boundary is enabled when a single, closed curve shape is selected. It creates the circles (4-node curves), then creates a Boundary from them. Break at all Cusp nodes can be used to set the stage for subsequent operations that would be applied based on subpaths, e.g., Artistic Media effects. One example of this is the creation of "revision clouds", as shown in one of the videos linked earlier in the post.

Bogus Symmetrical Nodes.

CorelDRAW's shaping operations (including Weld and Boundary) can in some situations produce curves that contain what I refer to as "bogus" symmetrical nodes. These are nodes that were symmetrical before the shaping operation, and still "think" that they are symmetrical, but cannot actually be symmetrical in the new geometry produced by the shaping operation. This results in geometry that looks correct, but that can then become distorted in unexpected ways if node editing operations are carried out that cause the bogus symmetrical nodes to "wake up" and start behaving symmetrically.

If Fix bogus Symmetrical Nodes is checked, then the macro inspects curves created by Weld and Boundary operations it performs, identifies such nodes, and "fixes" those nodes by changing them to be either smooth or cusp nodes, depending on the geometry. The Prefs tab has settings used in the process of evaluating curves to identify such nodes.

If you are particularly interested in bogus symmetrical nodes and how to fix them, then please ask. I have a separate macro that can be used as a general tool to evaluate curves and identify (and optionally fix) such nodes.

Using the Comboboxes.

The boxes for numeric entry are comboboxes. The drop-down list for a combobox can contain values stored for convenient access. If a combobox is not locked, then when a value in that
combobox is used by the macro, that value is added to the top of the list. If an existing value is used from the list, then that value is moved to the top of the list. Values can also be manually added to the list.

Ctrl+clicking on a combobox sets that combobox to its default value.

Right-clicking on a combobox brings up a menu of options for managing it.

    

These options may include:

  • Setting the combobox to its default value.
  • Defining the default value for the combobox.
  • Adding a value to the list.
  • Deleting a value from the list.
  • Sorting the list.
  • Clearing the list.
  • Locking or unlocking the list. When locked, new values are not added, and the order of values within the list is not changed when an existing value from the list is used.
  • Enabling or disabling Auto-select for the combobox. When Auto-select is enabled, then the text in the box is automatically selected when the box is entered.
  • Setting whether trailing zeros are shown.
  • Changing the number of decimal places used for values in the combobox.
  • Specifying the units.

Units of Distance.

For a combobox that represent a distance (e.g., Circle Diameter), values are applied by the macro in whatever units (inches, millimeters, etc.) are shown beside the combobox. Those units can be specified by the user through the right-click context menu.

If “Follow Horizontal Ruler Units” is chosen, then the units for the combobox are the same units that are in use in the document for the horizontal ruler. If those units are changed in the document, then the macro automatically changes the units in the combobox to match.

Although this documentation makes references to “the list” for the combobox, there is not necessarily only one list. The combobox maintains a separate list for any unit that is used in it. When units for the combobox are changed, then the list associated with those units is loaded. The number of decimal places, and also whether a list is locked or not, are things that are handled independently for each list.

A Video Describing and Demonstrating the Special Features of My ComboBoxes:

Circles on Curves subs in the Macro Manager.

  • Start_Circles_on_Curves launches Circles on Curves if it is not already open.
  • Toggle_Circles_on_Curves launches Circles on Curves if it is not already open, and closes it if it is already open. Assign this sub to a command button or shortcut key to have a one-click or one-keystroke way to call/dismiss the macro.
  • Remove_Circles_on_Curves_Registry_Entries removes all Registry entries that have been created by Circles on Curves. The next time thatthe macro is used, these entries will be created again, so this sub can be used to get a “fresh start” with default values and settings.
  • Circles on Curves normally remembers the position of the form on the screen. If the computer display configuration has been changed in such a way that the remembered position is “off the screen”, then Reset_Circles_on_Curves_StartUpPosition can be used to reset the position to “Center Owner”.

Compatibility.

Circles on Curves was put together in a CorelDRAW X7 environment, and should work in versions X7-2020.

OK, where's the macro?

JQ_Circles_on_Curves_Current.zip (most recently updated 2021-07-17).

That includes the .GMS file and a simple icon that can be used on a CorelDRAW Toolbar.

Please note that, starting with the version released on 2020-05-03, this macro uses a different scheme for storing combobox value lists and some preferences in the Registry. If you have been using an older version of this macro, those "old" value lists and preferences will not be there when you use the newer version. If you want to "clean out" those old entries that are not used by the newer version of the macro, the best way to do so is to run the Remove_Circles_on_Curves_Registry_Entries sub, which will set the macro back to its default values.

This version will not delete "old" presets (located in a file in the user's GMS folder), but it will convert those presets to a newer format.

  • 19 comments
  • 0 members are here
Anonymous
  • Nice John! Good for call out clouds with a bit of artictic media attached.

    • Thanks, Chris. Artistic Media is certainly the magic for making a "revision cloud" that looks similar to those from CAD software.

    • Really great job John.  I found this really handy and have always been looking for a good revision cloud maker.

      • I'm glad to know that you find this useful!

        The seed for this macro was this thread: "Revision clouds" with CorelDRAW...?.

        I set that aside at the time, but after working on the "bogus" Symmetrical nodes problem and some other stuff involving curves, it occurred to me that I might have enough in my toolbox to be able to do something for revision clouds.

        By the time I had revision clouds working, it had become obvious that I could do more with it - and Circles on Curves is the result.

      • Hi,

        Really great macro here, thanks for sharing!

        I already try it and working, but got this error message everytime I click "create circle" button.

        So I need to click "ok" several time to get done, can you help to solve this error or bypass error message?

        Thank you!

        • please response, btw the error occurred on X7

          Thanks!

        • The macro works correctly for me in X7. It could be difficult to solve the problem if I cannot reproduce it on my machine.

          If you are willing to do some testing to try to learn more about the problem, then please contact me by private message, and include an email address where I can contact you.

          • Can you only "bypass the error message" make it the popup dissapear? because the error message always pop up when I click "create circle" button.

            Everything else is prefectly fine. the issue only the error message pop up that keep shown.

            If I make the circle 100 pcs I must click 100 times for the popup message, because it keep shown after click ok button until 100 popup done.

            • I found your macro thru Doug Green YT channel. I tried that, but is give me an error (see attchment). Win 10 64 8GB RAM, Corel x7 17.0.0.491. After the message the macro jumps out, but the oject remain selected and eveything is blocked. The only way is to restart CD. What should I try?

              •   Forgot the message. Sorry.

                • I can only test on the few computers I own, and I don't see that error.

                  If you are running 17.0.0.491, though, then be aware that CorelDRAW X7 had multiple updates. My installation reports 17.6.0.1021.

                  I just checked, and Update 6 is still shown at https://www.coreldraw.com/en/support/updates/#cdgs-x7.

                  • Updating at 17.6.0.1021 solve the problems. Something related with Win 10 probably. Thank you for your hard work and support,

                • this macro is awesome