Inkscape.org
Beginners' Questions Edit a vector
  1. #1
    arnoldw arnoldw @arnoldw

    Vectorized an image.  Would now like to delete parts of the vector.  How do I do that?

     

    Thank you

  2. #2
    Xav Xav @Xav👹

    You can use the Node tool (F2) to select specific nodes and delete them. This can be slow for lots of nodes. I prefer to draw a shape over the parts I want to keep or remove, then use Boolean operations.

    See the earlier parts of this post for a little more detail: https://inkscape.org/forums/questions/how-to-copy-selection-of-sub-paths/#c3197

     

  3. #3
    brynn brynn @brynn

    Welcome to the forum!

    As we often see in Inkscape, there may be many ways to accomplish the same goal.  Here's another way.

    Depending on how you vectorized it, everything in the image might have ended up in a group.  So you can start by selecting it, then click Object menu > Ungroup (or there's a button in the command bar, which might be either on top on the right side of your screen, depending on how you have it configured) (or there's a key shortcut, see Help menu > Key and Mouse Ref).  Click Ungroup until you see the status bar says No More Groups To Ungroup.  Then deselect everything.  And now you will be able to select individual parts of the image.

    Beyond that, I would look in the top-right area of the forum for the Learn menu.  Follow those resources to start learning Inkscape.  Have fun!

  4. #4
    arnoldw arnoldw @arnoldw

    Thank you all.  Inkscape is frustrating to say the least.  Still struggling.

  5. #5
    brynn brynn @brynn

    So far, we really are only guessing, based on our experience helping other users over the years.  But you are more than welcome to share your SVG file with us.  Then we can tell you exactly how to get unstuck.

    You can attach it to your next message, the 2nd message in this topic tells how: https://inkscape.org/forums/questions/how-to-make-a-screenshot-and-put-it-in-a-message/   

    Or you could upload it wherever you like and just give us the link.

    Just tell us where you're stuck, and we can help  🙂

  6. #6
    Xav Xav @Xav👹

    By 'vectorizing an image' I'm guessing you mean you've used the Trace Bitmap dialog to turn an existing image into vectors. If that's the case, be aware that the traced version is put directly on top of the original raster image. If you don't separate them, or remove the raster, it can sometimes appear as though edits you're making to the vector aren't having an effect, simply because the original is still showing through.

    If you're not tracing an image, then please tell us a bit more about what you are doing.

  7. #7
    arnoldw arnoldw @arnoldw

    Correct.  Used the trace bitmap to create a vector.  Trying to eliminate some extra parts that appered when the drawing is vectored.  I selected all, click ungroup to try and delet the unwanted parts.

  8. #8
    Xav Xav @Xav👹

    Tracing a bitmap produces one single path (which may be made up of multiple sub-paths). It's not a group of objects, so ungrouping won't work. Insted you need to use node editing, Boolean operations, or similar approaches to either edit the path as it is, or split it into separate paths to work with. See my first post in this thread, and the thread I linked to there, for more details.

  9. #9
    arnoldw arnoldw @arnoldw

    Thank you. Here is the picture, pdf, and vector.

    Robert2
    Robert
  10. #10
    brynn brynn @brynn
    *
    Xav

    Tracing a bitmap produces one single path (which may be made up of multiple sub-paths). It's not a group of objects, so ungrouping won't work.

    Not entirely true.  At least not with Inkscape's Trace Bitmap.  Depending on the image being traced and the options used, the results might be grouped.  In the past, every result from Trace Bitmap was grouped.  I've noticed lately, that using certain options, the results are not grouped.  Not sure why.

    So what you said is true for some options, but not for all options.

    In this case, there is a Group of 1.  Although I'm not sure if it comes from tracing, in this case.  You can see it by selecting the larger path with Selection tool, and looking at the status bar.

    So you should be able to delete whichever part you want - the larger or smaller path.  Unless you mean you want to delete part of a path? 

    If that's the case, you'll need to use the Node tool.  If there is not already a node on either side of the part you want to delete, you'll need to add new nodes.  You can do that by double-clicking on the path with the Node tool (after you already click on it once, to select it).  Then select the new nodes, and click Break Path at Selected Nodes button, on the Node tool control bar.  Next do Path menu > Break Apart.  Then switch to the Selection tool and deselect everything, And then you should be able to select the part of the path that you don't want, and delete it.

    It looks like you're using the Gcodetools extensions.  If you have already used the one the produces the gcode, you'll probably need to re-do it, after deleting the unwanted part.  Otherwise, the gcode will have the unwanted path in it.

  11. #11
    Xav Xav @Xav👹

    Yes, I should have been clearer in my statement. Some options (such as the multiple scans) produce several paths which end up in a group. My point was that tracing a shape made up of multiple parts does not end up with a path for each part, all nicely wrapped in a group; rather you end up with a single path combining the separate shapes as sub-paths. So yes, tracing can end up with a group - but not a useful one if you want to remove part of your shape.

    I'm not really sure what the attachments are showing. The raster image and the SVG don't seem to have a direct relationship with each other. The larger shape in the SVG file is a single path which is either not the result of a trace bitmap, or was perhaps created using centreline tracing (I haven't got any experience with this yet, as it's a feature of the alpha version, not the current stable release). Either way, it only approximately relates to the shape in the raster image.

    @arnoldw I think we need a bit more step-by-step detail on what you've actually done to create the image you've got, and what you actually want to achieve.

  12. #12
    arnoldw arnoldw @arnoldw

    1. open inkscape

    2. import image

    3. trace to bitmap- which produces a lousy vector with a lot of junk besides the part. I would like to edit away all of the unnecessary junk and be left with just the part. The part is only partially traced also.  Missing sections of the lines.  Would like to be able to delete the unnecessay parts of the trace.

     

    Today- 

    open inkscape

    import image

    selected the draw bezier curves and straight lines

    drew around the part

    deleted part an am left with line drawn

    clicke on nodes and edited line by straightening out some of the bumps due to my poor hand movement

    selected circle tool made 3/4" circle

    moved circle to where it needed to be in part for bolt hole

    selected all made a path

    selected plasma tool

    selected generate path to gcode

    inkscape on the outside of the part generated code for the outside of the line and the inside of the line.  The bolt hole only one line.  So it cut the outside line twice on the inside of the line and the outside of the line......... Here I sit 

  13. #13
    brynn brynn @brynn
    *
    arnoldw

    trace to bitmap- which produces a lousy vector with a lot of junk besides the part. I would like to edit away all of the unnecessary junk and be left with just the part.

    I don't see any unecessary junk in your SVG file.  It is really a very clean couple of paths (although I would probably do some tweaking).  See my screenshot of the paths in the SVG file you attached.  (Note that I moved the orientation points away, to show the paths better.)

    I honestly did not know which part you originally wanted to delete.

    However, with your last message, it sounds like you decided to try to draw the paths, instead of trace them.  But there must be some confusion because when you report it cut the inside and outside of the line, that sounds like an auto trace result, from using the wrong options.

    But at least now we finally have enough info to explain how to do what it sounds like you want.

    First, I would draw the paths myself, by tracing a raster image with Pen tool, rather than auto-trace them.  If you do that, you won't have an inside and outside line.  You'll just have a single path.  I don't know, maybe you accidentally selected the wrong thing, when you created the gcode?  Here's how I would approach this, either way you want to go.

    This tutorial explains the basics of using the Pen tool to draw a path for cutting, including manually tracing a raster image.  (Note, this tutorial will disappear pretty soon (at end of January 2020) when I will have to close my website.  So be sure and save a copy for yourself, if you want to keep it available.)  https://forum.inkscapecommunity.com/index.php?action=articles;sa=view;article=45

    Or if you want to autotrace a raster image which is a single line path, you would need to use the Centerline Trace extension.  Extensions menu > Images > Centerline Trace  If you don't find it, you'll need to install it.  I think it's part of Inkscape natively now, but I'm not positive.  Here's download info, if you need it:  https://github.com/fablabnbg/inkscape-centerline-trace

    This is the general routine for using the Gcodetools extensions.  It must be done in this order, with the paths selected which you want to cut (or engrave or whatever).

    1. Extensions menu > Gcodetools > Orientation Points
    2. Extensions menu > Gcodetools > Tools Library
    3. Extensions menu > Gcodetools > Path to Gcode, or whichever specific type of cutting you need (i.e. Engraving, Area, etc.)

    Note that for #3, you need to have the Preferences tab open, when you click Apply, to create the gcode.  If some other tab of Path to Gcode or whichever specific dialog you're using, is open, the gcode will not be created.

    Also when using that dialog, as you try different times to create gcode - Inkscape is making a new file for you, every time.  Unless you change the file name in the dialog, your computer is probably naming them with extra numbers in the file name.  So be sure you are sending the right gcode (NGC) file to the cutter.

    2P
  14. #14
    arnoldw arnoldw @arnoldw

    No, when trace bit map  used there are incomplete lines and dark parts all over the page. The vectore needs edited.

    I did not try to trace the picture, I did trace it using the Bezier curves and stright lines feature no mistake there. If you look there are 2 lines there when only 1 was drawn.

    No confusion on my part there is a path created on the inside of the line and outside of the line.  So the plasma cuts the inside and outside of the line except for the added bolt hole.

    You will notice in the example that the vector lines are incomplete and need edited to make a gcode path. 

    Robert New Tuesday
    Example
  15. #15
    brynn brynn @brynn
    *

    Oohhh, I see what the problem is!  It looks like you had the Pen tool set with either the Triangle In or Triangle Out profile assigned to it, when you traced the path. 

    Enable the Pen tool.  Look on the control bar, which is the first bar of icons above the horizontal ruler.  In the Shape dropdown menu, make sure None is selected.  Then you will be able to draw single paths.  With Triangle In/Out, you actually draw extremely long, extremely skinny triangles, rather than a regular path.

    Yes, and now I see your trace results.  I'm not sure what paths you had showed before (in the file called Robert.svg).  But it's the example.svg file that we needed, to see what you wanted to delete.  (If you zoom in closely to that, you will see that it has inside/outside paths too.  That's why you would need the Centerline Trace, to get just a single path.) 

    But now I see the original image and your trace results.  The reason the trace results are so poor is because the original image is not in the best shape for auto-tracing.  The line is thinner or lighter in some places than others, with some stray marks around it.  So you would need a little better quality image, to be able to get a good result with auto-tracing.

    (Back in earlier versions of Inkscape, there was a trick you could use to get a good trace result from a bad quality image.  But it doesn't work anymore.  Now you have to either have, or create a good quality image to trace.)

    I would suggest, since the paths you need are so simple, to trace them with the Pen tool (with None for Shape).  But if you want to auto-trace, you still probably need a little better quality image - a bolder, or at least darker line.  And you would need to use Centerline Trace.  I think it's installed with Inkscape, but not sure.  Look for Extensions menu > Images > Centerline Trace.

  16. #16
    arnoldw arnoldw @arnoldw

    This is what I did and it ended up cutting on the inside of the line and outside of the line.  Not sure what I did to make it do that.  https://forum.inkscapecommunity.com/index.php?action=articles;sa=view;article=45Or

  17. #17
    brynn brynn @brynn

    As I said, I think you had the wrong settings for the Pen tool.  You did the drawing properly, but the settings were wrong.  Here's how to fix it:

    brynn

    Enable the Pen tool. Look on the control bar, which is the first bar of icons above the horizontal ruler. In the Shape dropdown menu, make sure None is selected. Then you will be able to draw single paths.

  18. #18
    arnoldw arnoldw @arnoldw

    Ok. I will look for center line.  Thank you for the tip on the triangle. You were correct.  If I turn off the triangle do I still need to do the centerline trace?

  19. #19
    brynn brynn @brynn

    No.  You can do one or the other.

  20. #20
    arnoldw arnoldw @arnoldw

    You rock! It cut out this morning. Thank you.  I never did find the centerline trace but did turn off the triangle.

  21. #21
    arnoldw arnoldw @arnoldw

    I have to run Inkscape .91 for my cnc plasma cutter to run.  If Centerline trace is downloaded and installed will it mess up .91?

     

    Thank you,

     

    Arnold

  22. #22
    brynn brynn @brynn

    Congrats!

    I think Centerline Trace is already installed in Inkscape.  I'm not positive, but I think it is.    Look in Extensions menu > Images > Centerline Trace.

    Although....I'm less sure that it's already installed in 0.91.  Maybe not there in 0.91.  (I do not still have that version installed, so I can't look to find out.)

    But even if you need to install it, it would not mess up anything.  It's made for Inkscape and only for Inkscape, so it can't harm the program.

  23. #23
    Xav Xav @Xav👹

    On my 0.92.3 installation (Ubuntu Mate) there's no Centreline Trace. I don't think it was included as a standard extension - Brynn, perhaps you installed it manually at some point. I believe it is in the Trace Bitmap dialog of 1.0alpha, so will presumably be included as standard in future releases.

  24. #24
    brynn brynn @brynn

    Ummm....  Yes, it's in the Single Trace category of the Trace Bitmap dialog, in 1.0 beta.

    I have it in Extensions menu > Images, twice.  That's what made me think it was already installed.  I thought I had installed it in an older version, and now being native, and I didn't delete the first one, that's why I see it twice.  I remember testing it, while trying to help someone else install it, at one point.  So maybe it accidentally was installed again, at that time?

    Somewhat off topic:

    Holy crap!  What the heck is that "Autotrace" option, in 1.0 Trace Bitmap?  The whole thing is known as autotracing, so why is there a single option called that?  It appears both under single scan and multiple scan categories.  Whatever it is, I will gladly file a bug report to get better language, if that's what's needed.  But this is something we'll be answering all the time, if we don't get some clarification about it now.

    By the way, is there any ETA for getting the mailing lists back online.  It's a big ol' pain in the behind, trying to have a community discussion about anything these days!  I guess the chatroom is the only way....

  25. #25
    Maren Hachmann Maren Hachmann @Moini

    Autotrace is the name of the library that does the centerline tracing. It has some more features, so it is offered as another tracing mechanism.

  26. #26
    arnoldw arnoldw @arnoldw

    As far as I can tell it is not on .91 that is needed to run my cnc/plasma cutter.  It could be I am not looking it the correct spot.  Is it possible to download it and install it?

  27. #27
    Maren Hachmann Maren Hachmann @Moini

    Yes, not sure if it will work with 0.91, but here's the link: https://github.com/fablabnbg/inkscape-centerline-trace

  28. #28
    arnoldw arnoldw @arnoldw

    Thank you

  29. #29
    arnoldw arnoldw @arnoldw

    on this file it shows Gcode for the top of the candle.  When loaded into the cnc/plasma software it is only reading and cutting the bottom part out.  What am I missing?  Thank you.

    Christmas Candle
  30. #30
    Maren Hachmann Maren Hachmann @Moini

    Path > Convert to Path for the circle, maybe? (didn't download, this is just a quick guess)

  31. #31
    brynn brynn @brynn

    The SVG file looks proper to me.  Unfortunately, I don't know how to read the gcode file (NGC).  I would probably try re-creating a new NGC file, and see if it comes out larger this time.  Or maybe someone else can read the gcode?

  32. #32
    arnoldw arnoldw @arnoldw
    *

    Here is an svg file that came with a dxf I purchased.  When opened in Inkscape, Inkscape will not creat gcode for this.  Trace Bit map doesnt work either.  Object to path doesen't work etc.  Why doesn't Inkscape which creates svg files create gcode from an already available svg?

     

    Thank you

  33. #33
    brynn brynn @brynn
    *

    For some reason, the image was not showing in your message.  (I don't know why.)  I edited your message to make it show up under Attachments link.  So now I can download it and figure out what the problem is.

    Hhmm....the only potential problem that I can see, is that there are several nested groups.  After doing Ctrl a (select all) I had to click Ungroup 6 or 7 times, to get rid of all the groups.  I don't know gcode well enough to know whether it's supposed to be able to handle groups or not.  But that's all I could suggest, is to get rid of all the groups.

    I don't know why it didn't show up in the message.  As far as I can see, it should have.

    Edit

    I just noticed a strange appearance of the code in the XML Editor.  I don't know if it's proper SVG code.  Maybe that's why the gcode extension could not produce the gcode.  (Also maybe the problem with the image showing in the message?)  I'm guessing.

    Try this.  Open the file and ungroup everything (just to be sure).  Then copy everything, and paste it into a new blank file.

    Next do Document Properties > Page tab > Page size > Custom size > Resize page to contents

    Then save the file.  Then run the gcode extensions.

    Hopefully, pasting the contents into a new document will fix the strange XML code.