Inkscape.org
Beginners' Questions Path Difference results in circle radius being slightly reduced
  1. #1
    QuazarOmega QuazarOmega @QuazarOmega
    • OS: Fedora 34 (Workstation)
    • Version: Inkscape 1.1

    I have made two circles of the exact same size that completely overlap, then I added another circle at the bottom, intersecting the circumference:

     

    Then I selected both the purple circle (the one on top of the other) and the intersecting circle and applied Path -> Difference, it does cut into the purple circle, but it also ends up removing a very thin line around the circle, leaving the circumference of the circle below exposed:

     

    How do I avoid this behaviour?

  2. #2
    inklinea inklinea @inklinea⛰️

    Can you make sure you have Edit>Preferences>Tool set to Geometric Bounding Box ( Not Visual Bounding Box )

    With that set my width / height goes from

    527.656 x 527.656

    to 

    527.657 x 527.656

    Which is a 0.001 change. Very small but I think unavoidable due to the calculations involved.

  3. #3
    Polygon Polygon @Polygon🌶
    *

    From my experience it simply won´t work with just 4 nodes for a circle. When you convert to path and add up nodes to 32 for each circle you´ll notice a much smaller rim which won´t appear at all with rectangles for instance. So it´s an issue in general and not just Inkscape related.

  4. #4
    QuazarOmega QuazarOmega @QuazarOmega

    Ok, I tried setting the Tool to Geometric Bounding Box and it did in fact make the border noticeably smaller although it is still there:

    Then I tried converting the circle to a path (Path -> Object to path), selecting all the nodes and I used Insert new nodes into selected segment 3 times to subdivide it a bit, that worked pretty well, and it only left a bit of border at the edges:

    I tried combining both methods and the result is pretty much the same as just applying the subdivision:

    So in the end every method requires manual adjustment to refine, for example starting from the subdivided one:

    I understand that it's not feasible, can I have some information on why that is? I'm curious to know what makes it impossible

  5. #5
    Tyler Durden Tyler Durden @TylerDurden

    Inkscape paths are Bezier curves.

    Maybe this?

     
    • Some curves that seem simple, such as the circle, cannot be described exactly by a Bézier or piecewise Bézier curve; though a four-piece cubic Bézier curve can approximate a circle (see composite Bézier curve), with a maximum radial error of less than one part in a thousand...

    https://en.wikipedia.org/wiki/B%C3%A9zier_curve

     

  6. #6
    QuazarOmega QuazarOmega @QuazarOmega

    Interesting, thank you!

    So, as I understand, a basic circle is made up of four Bézier curves which are an approximation of a curve and the Path Difference operation can only be applied to such paths. I'd like to know more about how this affects the Difference operation such that it produces this kind of result, but I fear this might drive the discussion off topic since it would be getting more on the technical side of things, so I can consider this solved already.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Path Difference results in circle radius being slightly reduced