How to clean up messy node vectors

Tips for cleaning up messy nodes with the curve fit tool that will give you cleaner designs and faster toolpaths. This lesson applies to VCarve, Aspire, and Cut2D.

Want to learn more??

Click the link below to take your Vectric skills to the next level!

Video Transcript:

Hello everyone. In this quick tip, I'm gonna show you how to clean up messy vectors with a bunch of nodes when they look like this. And we're gonna turn them into something more like this with less nodes and cleaner lines. And this usually is a simple process to clean up the nodes like you see here.

Sometimes there does require extra work to clean up the nodes, but I will teach you some tips on that in this lesson. Okay, and to start off, we have to know what these nodes actually do, so there's gonna be different node types. You're gonna have smooth nodes, you're gonna have straight line nodes, and you're gonna have arc nodes.

So whenever you have a smooth node, it will be blue and it'll have these handles attached to it like this, and that's considered a bezier curve. And then, The other node types will just be straight lines or arcs. But the reason we want cleaner lines and less nodes is, one it'll make your designs a little bit quicker to work with because it doesn't slow your computer down as much with the more information.

And for two, this will make your toolpaths faster, which will reduce your machining time. And what I like to say is each one of these nodes is like a destination, on a road map. So if you're imagining you're going along a road trip on your vector line, if you had to stop a bunch of times like this one here, imagine stopping at each one of those black lines. That's gonna create a line of G code in your final toolpath.

And that's gonna require a lot of movements just to make that curve line. Whereas a cleaner line like this only has to make a few stops in that same amount of distance. So less nodes will equal faster toolpaths, so that's what we're gonna look at today.

So for start, I'm going to delete that second line, I'll show you how I created that. And first, let's look at the map down here. This was an imported Vectric, which was a DXF file. And another tip here is DXF files are usually the worst files to import when they have curve lines. Because when you look at the nodes, it will convert all those curve lines, into straight line segments.

So that creates a bunch of nodes where there shouldn't be as much. So that's why we have to do extra cleanup work when you import a DXF file. So the other file types you can import that are usually much better is if you go to file Export, and you'll see these different file types here. These are actually file types you can import as well.

So EPS, AI, SVG, and PDF, those different file types usually come in much better than the DXF file type. So if you can try finding one of those file types rather than the DXF file. Okay, so if you do import the DXF file, If that's the only one you could find, that's okay we could still work with it. So I will show you real easy step to clean this up is to go to this tool here, it's called Curve Fit.

And when you open that up, you're gonna have three different types you can choose from. We can convert it to circular arcs, bezier curves, or straight lines. So that will take whatever line segments we have now and convert it to these types here. 98% of the time I use Bezier Curves because I am trying to make these curves smoother.

And this is converting straight lines into curves. Rarely I will use the other two types, but, but just so you know, Bezier curves will be the most selected fitting type. Okay, next is the tolerance. So this will be how tightly you want the new line to follow the original line we have now. And I'll show you some differences on that.

Next, you have the option to keep sharp corners. So if you have sharp corners in your design and you want to keep them, you can turn that on and set a max angle for that. If you don't want sharp corners, you can turn that off, and it will make smooth round corners. And then the last thing here is replace selected vectors that will delete this line we have selected now and create a brand new one in place of the one we have now, with smoother vectors.

So let's zoom into an area like this. Where you see all these nodes here and if you just click preview, you see that looks much better already. It removed as many nodes as it can to fit within that tolerance that we set. And I'm gonna edit, undo that and I'll show you if we don't replace the selected vectors and we click preview, that will keep both the original and the new line.

And if you zoom in, you can see this new line, which is the dotted line, will vary slightly away from the original line. So that is what the tolerance will do. Whatever number you have set here, that's the max it will tolerate away from the original line. So between this line and this line should be no greater than 0.04 inches that we set there.

And that is the tolerance number I usually use, it works pretty good. You can adjust that though if needed. I will show you what it looks like if we were to adjust that. So let's do edit, undo. So now we're back to our original line. If we were to remove a zero off of this, Which would, uh, make that tolerance number bigger, which would vary the line further away from the original line.

And you click preview, you'll notice the more tolerance you set there, you'll have less nodes, but it will also vary much further away from the original line. So if that original line placement is important, you don't want to make your tolerance too high. And you'll see if we undo that again, and remove another zero, and now it's just 0.4 Inches, which is really big.

And click preview, you'll see it'll start to vary widely away from that original line. You're gonna have less nodes, but you're also going to not match the original line. So just keep that in mind that's what that tolerance setting is for. And that will vary depending on how complex the shape is. Like this shape up here is a little bit smoother, so that tolerance, it will not be as important as shapes like this where it has tight corners like this one has.

So I would edit, undo, and I would just keep that at the original 0.004, and I'm going to replace selected vectors. Also, one last thing to note here is whatever layer you have active, that's what layer the new vectors will be placed on. So you can see if I add a new layer and name it, map. And make that layer active by selecting it, and then click preview.

And then click, okay. Now, if I zoom out and you could see the map layer, if I hide that, that is that new vector created on that layer. Okay, now if we select that vector and go to the node edit mode, you could see now there are all blue nodes and that is telling us that it is now smooth curves.

Now you will notice a few black ones there, that is just an endpoint where it comes to a sharp corner. But you see the handle on there, it is still a smooth curve because it has that handle on there. Just the black nodes are the endpoints, and then there will be one green point that is your starting point, and you can change that at any time by right clicking on a point and click make start point.

And also, like I mentioned earlier, you may have to do further editing. So if your shape is very complex, like that little, uh, kick out here, if you want to remove that, you can just right click on a node and click delete point. And then this point, if you want to turn it into a blue smooth point, you can right click, click smooth point, and you'll see it may do something like that.

Then you just grab a handle and move it in the direction you want it to go. And then that would smoothen that out where it used to have that kick out. So that is some manual editing you could do if needed. And let's take a look at this shape up here. So this shape I simply created using the tools that we have here.

So I will make another one, let's delete that. And I'm actually using the new freehand drawing tool. And you can just click and start to drag and just make a random shape. And when you get close to the end, click the tab key and that will close the shape. Then click close. If you don't have that in version 11.5 or above, you can also use the draw curve tool to accomplish the same thing.

Okay, so when we select this and click the letter N to go to node edit mode. You can see this looks fairly clean, there's not too much nodes in here. But one problem with Vectric is whenever you offset a curve line, it creates it into straight line segments. So I'll show you what I mean by that. If you go to the offset tool and set any offset amount, either outwards or inwards, and then click offset, and then click close.

And now if we select that new line and click the letter N go to node edit mode, you can see it kept the original shape, but it converts it into straight line segments just like it does when you import a DXF file. So that is one unfortunate thing there that it does, but luckily it's easy to fix just by going to the Curve Fit tool.

We're gonna use the same settings as before, bezier Curve, same tolerance. And we're gonna, uh, replace selected vectors. The keep sharp corners, there are no sharp corners, so it doesn't really matter if you have the on or off. You could see, you could just turn that off if you wanted to. And click preview, then click okay.

And now when we go to node edit mode, you could see that looks much better. And like I said, you can do further editing on that if you needed to, but that is basically it. That is how you could clean up shapes when they have a bunch of extra nodes, and that will allow you to work with your computer much quicker if you have a slower computer, because that adds a lot of extra data with the additional nodes.

But more importantly, it'll also make your toolpaths much quicker, when it doesn't have to stop at all those different nodes and your G Code files should be much shorter as well. And that's all for this quick tip. If that helped you out, make sure you like and subscribe for more.
Kyle Ely | Learn Your CNC

Kyle is the founder and instructor at Learn Your CNC and he is very passionate about designing and creating things from scratch. He has been woodworking since he was 12 years old and built his first homemade CNC router machine when he was just 16 years old. Now with over a decade of CNC experience, he loves to share his knowledge with others.

https://www.learnyourcnc.com
Previous
Previous

Quickest Keyboard Shortcut to Factor Scale

Next
Next

Keyboard Shortcuts for Moving Objects