Inkscape.org
Beginners' Questions Path Difference is not working properly
  1. #1
    dollymixture2046 dollymixture2046 @dollymixture2046

    I am trying to create a circle cut out from a star outline I have created in inkscape. I have moved the circle to the top and the star outline to the very bottom, I select both and difference and it cuts a non perfect circle. Please help this is driving me insane!

    Screenshot 2 After Difference
    Screenshot1Before Difference
  2. #2
    Paddy_CAD Paddy_CAD @Paddy_CAD
    *

    Maybe I've misunderstood your question. Have you converted your star stroke to a path [Path > Stroke to Path]. It seems to work for me. This screenshot uses [View > Display Mode > Outline Overlay] to show circle over star, circle difference star, circle over path, and circle difference path.

     

    When you use boolean operations or any operation on very small features, you may fall foul of Inkscape's numeric precision limit. Node coordinates by default are limited to 8 significant digits but this can be changed in the preferences [shift+ctrl+p] [Input/Output > SVG Output > Numeric Precision: XX].

  3. #3
    dollymixture2046 dollymixture2046 @dollymixture2046

    Thank you so much for your response. you'll have to forgive me as I'm very new and can't quite follow everything you've said. Your diagrams are from your own creation right? Rather than the file (SVG) I attached? My star isn't a stroke, I created it by inserting a star SVG, using the path effect offset feature, then using it again on the offset and doing path difference to create the outline. Perhaps this is a long winded way to achieve what I was looking for but I was finding it hard to make a 2mm internal border of my star shape, with a 2mm gap inbetween. Please take a look at my screenshots of before I do the path difference and after, can you see that it hasn't cut the circle properly like in your example? It's an imperfect circle and I don't know why.

    All I'm doing is selecting both and then Path>Difference, but the circle cut out is a strange shape, I'm baffled

     

    Outline After
    Outline Before
  4. #4
    Polygon Polygon @Polygon🌶
    dollymixture2046

    but I was finding it hard to make a 2mm internal border of my star shape, with a 2mm gap inbetween

    You can draw with a 2mm stroke width instead and convert with Path->Stroke to Path and then kill-the-fill and add stroke color if you need an outlined shape.

  5. #5
    Paddy_CAD Paddy_CAD @Paddy_CAD

    Yes, that's my own illustration.

    I'm not quite sure what happened your drawing but it seems that the Offset path effect hasn't played nicely with the boolean Difference operation.

    Instead of using an offset, set the stroke width of the star. Then [Path > Stroke to Path] draws a boundary around the painted stroke and applies a fill. Visually the image remains the same despite changing the underlying geometry. Use the Node tool to see the differences.

    Inkscape and svg terminology can seem arcane to novices. I found these analogies to be helpful.
        Node  -  coordinates or dots that define a shape
        Path  -  route taken between the nodes of a shape
        Stroke  -  paintbrush used to trace the path (or paths) of a shape
        Fill  -  paint used inside the area bounded by a path

    All shapes are ultimately a combination of these but stars, rectangles, ellipses, etc., use internal calculations to generate the nodes and paths you see on the canvas.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Path Difference is not working properly