Is there a way to make multipolys out of broken ellipses?

I drew the image in Figure 1. I would like to change it so that instead of a white circle with purple entities on top of it, it is a single white entity with the atom symbol created from negative space. The skeleton of the image is shown in figure 2: It is a circle filled solid white, a smaller circle filled solid purple, and three rings, each composed of two ellipses combined into a multipoly and filled solid purple.

After exploding the three rings, I combined the entities in Figure 2 into a multipoly filled solid white, and Figure 3 was the result. This has its own funky charm, but is not what I want.

I attempted cleaning up the intersections of the rings by breaking the ellipses and trimming them to the intersection with the next broken ellipse, as shown in Figure 4. When I combined the entities in Figure 4 into a multipoly filled solid white, Figure 5 was the result. Again, not what I am looking for.

This turned out to be because the "trim to intersection" command did not result in the broken ellipses connecting. Rather, if one zooms in, the endpoints of the broken ellipses are near each other, but not touching. The same thing resulted when I tried using the "trim" command combined with the "on" modifier. "Trim to entity" would not allow me to choose a broken ellipse as the target entity. I also tried connecting a line segment between the adjacent endpoints of the broken ellipses. Unfortunately, the "endpoint" modifier does not connect the line segment to the endpoint of the broken ellipse, but rather to a seemingly arbitrary point nearby.

So, what is going on with CC and ellipses? And is it possible to do what I am trying to do in CC? I don't want to do it in GIMP, because I need a vector file, not a bitmap.

Best Answers

  • MonsenMonsen Administrator 🖼️ 46 images Cartographer
    Accepted Answer

    This is a bit of a tricky problem.

    The issues you see in figure 3 is because multipolies based what their display on the number of overlapping entities. And while a single ellipse on top of a white background will be exactly two entities, so it will generate a hole in the circle, wherever two ellipses overlap, you will have three entities which results in a solid surface at those locations.

    Now, as you discovered, cutting and trimming isn't really a solution here. This is because the way CC3+ handles curves. The nodes of a curve does not lie along the curve itself, and arcs do not have nodes at all, they are a result of pure math. If you try to work with wide lines instead, you get other issues because you can't trim to the actual width of a line since that is just a property, the trim hits the center of the line.


    I think the attached version should be what you are asking for though. I started from your figure 2 and converted those arcs to smooth lines. It takes a few steps per line to do this, but basically, split it open so it turns into an arch, use line to path on it, split it open again because the last command closes it, and then use straight to smooth on it. This needs to be done on all six lines individually.

    Once that is done, you can start trimming them. It can be advantageous to split them in the middle of the intersections before trimming, and after that you can trim using trim to entity, trim to intersection, or just trim and targeting the endpoint of the other line. Generally, if trim to intersection fails (sometimes it does), a simple trim to the endpoint works instead.


    LoopysueQuentenjamescbennett
  • MonsenMonsen Administrator 🖼️ 46 images Cartographer
    Accepted Answer

    Not sure why that happens. Use Break instead, that should allow you to take out a controlled chunk and not have the arc disappear.

    JimPjamescbennett
  • 9 days later
  • Accepted Answer

    Thanks for all your help!

    For anyone who finds this later, the fix was as follows. Text commands are in all caps.

    For each ellipse:

    1. BREAK -- Converts the ellipse entity into an elliptical arc entity.
    2. LTP2 -- Converts the elliptical arc entity into a straight path entity.
    3. STC -- Converts the straight path entity into a smooth path entity.
    4. CLOSEPATH -- Converts the smooth path entity into a smooth polygon entity that looks just like the original ellipse.

    Once you have the smooth polygon entities, you can break and trim them to your heart's content.

    Royal ScribeJimPMonsenLoopysue

Answers

  • 9 days later
  • MonsenMonsen Administrator 🖼️ 46 images Cartographer
    Accepted Answer

    This is a bit of a tricky problem.

    The issues you see in figure 3 is because multipolies based what their display on the number of overlapping entities. And while a single ellipse on top of a white background will be exactly two entities, so it will generate a hole in the circle, wherever two ellipses overlap, you will have three entities which results in a solid surface at those locations.

    Now, as you discovered, cutting and trimming isn't really a solution here. This is because the way CC3+ handles curves. The nodes of a curve does not lie along the curve itself, and arcs do not have nodes at all, they are a result of pure math. If you try to work with wide lines instead, you get other issues because you can't trim to the actual width of a line since that is just a property, the trim hits the center of the line.


    I think the attached version should be what you are asking for though. I started from your figure 2 and converted those arcs to smooth lines. It takes a few steps per line to do this, but basically, split it open so it turns into an arch, use line to path on it, split it open again because the last command closes it, and then use straight to smooth on it. This needs to be done on all six lines individually.

    Once that is done, you can start trimming them. It can be advantageous to split them in the middle of the intersections before trimming, and after that you can trim using trim to entity, trim to intersection, or just trim and targeting the endpoint of the other line. Generally, if trim to intersection fails (sometimes it does), a simple trim to the endpoint works instead.


    LoopysueQuentenjamescbennett
  • Thank you so much!

    If you will indulge me, though, I am trying to recreate what you did to fix it, so I know how it works if I need it in the future. And...I've run into a problem on the first step: when I split any of the ellipses, they disappear from view. The entity still exists, and if I increase the line width you can see a short line where the split was made. I have no idea what the problem is, though I imagine "arc length 0.00000 mm" might have something to do with it. Any clues?

    Thanks again for your help.

    This is the larger horizontal ellipse entity pre and post split:

    Before Split:

    +--Sheet: Heraldry ----------------------

    |

    |2D Ellipse: color 15 (white) layer 260 (Heraldry)

    |  line style 0 (Solid) fill style 0 (Hollow)

    |  line width 0.00000 mm tag # 10493 pen :0.000 mm 2nd color 15

    |  center at -0.00464 mm,0.00464 mm, major axis radius 2.79784 mm

    |  eccentricity 0.41667, inclination 0.00000°

    |  area 10.24669 mm, circumference 12.98572 mm²

    |

    +-----------------------------------------


    After Split

    +--Sheet: Heraldry ----------------------

    |

    |2D Elliptical Arc: color 15 (white) layer 260 (Heraldry)

    |  line style 0 (Solid) fill style 0 (Hollow)

    |  line width 0.00000 mm tag # 10493 pen :0.000 mm 2nd color 15

    |  center at -0.00464 mm,0.00464 mm, major axis radius 2.79784 mm

    |  eccentricity 0.41667, inclination 0.00000°

    |  starting angle 178.74952°, angle width 360.00001°

    |  arc length 0.00000 mm

    |

    +-----------------------------------------



  • MonsenMonsen Administrator 🖼️ 46 images Cartographer
    Accepted Answer

    Not sure why that happens. Use Break instead, that should allow you to take out a controlled chunk and not have the arc disappear.

    JimPjamescbennett
  • 9 days later
  • Accepted Answer

    Thanks for all your help!

    For anyone who finds this later, the fix was as follows. Text commands are in all caps.

    For each ellipse:

    1. BREAK -- Converts the ellipse entity into an elliptical arc entity.
    2. LTP2 -- Converts the elliptical arc entity into a straight path entity.
    3. STC -- Converts the straight path entity into a smooth path entity.
    4. CLOSEPATH -- Converts the smooth path entity into a smooth polygon entity that looks just like the original ellipse.

    Once you have the smooth polygon entities, you can break and trim them to your heart's content.

    Royal ScribeJimPMonsenLoopysue
Sign In or Register to comment.