Inkscape.org
Beyond the Basics How to actually DELETE invisible area around clipping?
  1. #1
    grepper grepper @grepper

    1.  Draw a black rectangle.
    2.  Draw a smaller red circle over the rectangle.
    3.  Object>Clip>Set

    Result = black circle, as designed.
    Area around the circle is "invisible", but it still exists.

    How to actually delete the "invisible" data.

    Problem:

    1.  Select the clipped object.
    2.  Copy it and Paste it into a new document.

    Both the clipped part and the invisible stuff is Pasted into the new document. 
    How to clip and delete the area around the visible clip and not just make it invisible?

    Thanks.

     

  2. #2
    greytomorrow greytomorrow @greytomorrow
    *

    Can't replicate.

    When pasted in another document or even the same document, I get the same results.

    Tested with both 0.92.4 and 1.0beta2.

  3. #3
    Flamingolady Flamingolady @flamingolady🦩

    That's just what clipping and masking do - if you want to delete it, then you'd need to do a path difference or one of the operations that fully deletes it.  If you don't want to lose that part of the object, then you could always duplicate it and hide it on a hidden layer just to be safe.

  4. #4
    grepper grepper @grepper

    I just got the wonderful Inkscape, so I'm still figuring it out.  Please forgive me if I ask something stupid. This issue came from a project I did while learning how to use Inkscape.  Here's what I see:

    I wanted a grid pattern on this gear.  I rendered a grid and placed the gear over it. Object>Clip.  Worked great.


    I wanted to center the gear on another object using Object>Align and Distribute.  When I attempted to select the gear I got this:

    Learning to use Inkscape I had experimented, added and deleted lots of stuff.  Checking the object tree there seems to be all sorts of left over junk with needless nesting and groups with boundary boxes that seem to define nothing.  

    Am I correct in guessing that over time the object tree can become cluttered with junk? Here is the object tree for this drawing.  As I click through it, there seem to be needless groups and nesting.  I don't fully understand exactly how the object tree works yet.

    Is there an easy way, or function to clean this up and delete unnecessary junk or is it a manual process?

    My apologies if I'm asking stupid questions!

  5. #5
    grepper grepper @grepper
    *

    I get it!  Hopefully someone else might find this helpful. 

    I copied only the necessary paths to a new file.  This created a clean, simple object tree.

          

    I want to group all the paths so they can be moved as a unit.  Drag a selection box around both halves of the gear then Object>Group.  This group is shown in the object tree as g1614 containing all of the grouped paths.

         

    If the same action is performed again (select objects then Object>Group), Inkscape will dutifully create another group.  It might be nice if Inkscape would ask, "Group already exists.  Create a new group?  Yes/No".  But, I can see that is a can of worms.  Anyway, here's what happens if the group is grouped again.  New group g1622 is created containing the previously created group g1614.


    Apparently as I was learning I did not understand/realize some objects were already grouped so I would just select and make another group.  This resulted in a cluttered  and deeply nested object tree.


    My apologies for starting a thread before taking the time to really understand the problem.

    Thanks for the replies!

  6. #6
    Flamingolady Flamingolady @flamingolady🦩
    *

     

     

     

     

    Edit. Whoops, see you figured it out, you have a grasp of the tree!

    Not stupid at all. First, there's more than one way to do this.  Instead of clipping, I'd personally dup the image,  delete all nodes  except half of the design, and use it to cut into  grid. Path>difference.  Then you  can copy the grid that now fits snugly inside your design, do for both pieces, then group it all together.   Like said there's usually more than one way to accomplish this.  Others may have a better way.  

  7. #7
    grepper grepper @grepper

    Yup.  That works too and is probably a better or simpler way.  I've only had Inkscape for a couple of days.  I only learned about Path>Difference when trying to figure out and research what I perceived as a problem. :)  Like you say, there may always be an even easier way!

    With all those nested groups I had going, I was getting strange and unpredictable results with clipping and other operations.  It was a hair pulling freak show!

    Taking the time to understand the tree made it all easy and clear.

    Really appreciate your replies!

  8. #8
    Flamingolady Flamingolady @flamingolady🦩

    You're doing really well for a beginner!

  9. #9
    grepper grepper @grepper

    Aw, shucks Flamingolady. :)  IMHO, for anyone just starting as I am, taking the time to understand the tree is well worth it, if not a necessity.

    The tree in my first project was a mess,  Extra nested groups made it very difficult to work with.  After understanding tree I was able to clean things up.  Now it's easy to understand, easy to work with and functions work as expected. 

  10. #10
    Flamingolady Flamingolady @flamingolady🦩

    Now see, I would never have even thought to look at the tree!  Kudos

  11. #11
    Tyler Durden Tyler Durden @TylerDurden

    Use the Objects dialog at your own risk.

    I suggest working through the standard tutorials, reading the manual and later taking a deep-dive into Xav's tutorials.

     

    Have a nice day.

    TD

  12. #12
    Xav Xav @Xav👹
    TylerDurden

    and later taking a deep-dive into Xav's tutorials

    Just to clarify, the earlier tutorials are aimed at beginners. They're still pretty comprehensive, but I do start from absolute basics, so you can take a shallow-dive instead.

    The series does build up over time, however. Later instalments cover some pretty complex tools and ideas, which is, I think, where TD's suggestion of a 'deep-dive' comes in.

    If you do want to take a look, here's the full index (note that the magazine they appear in is a free download): http://www.peppertop.com/blog/?p=1563
     

  13. #13
    grepper grepper @grepper

    Thank you Xav.  I'll binge watch them.  Good thing to do while following the state's (Michigan) stay at home order.  I'll just wear a mask and sit 6' from my computer.

  14. #14
    Xav Xav @Xav👹

    Binge read, I'm afraid. They're magazine articles, not videos.

    I'd like to do some videos, but I never seem to find the time. I do have a Youtube channel, though, where you can find a series of tutorial videos by Heathenx and Richard Querin. They were originally posted a few years ago, so I've added notes where things have changed in more recent Inkscape versions - but they're still pretty relevant today.

    http://www.youtube.com/c/PeppertopComics

     

Inkscape Inkscape.org Inkscape Forum Beyond the Basics How to actually DELETE invisible area around clipping?