I have a program that exports the attached file (see sample2.cmx) to be used with coreldraw. After I import the file into coreldraw I can make any changes and send the final product over to my cnc machine. The problem is that the exported files never have the lines "connected" and therefore the cnc machines does each line individually (in random order it seems) until it's done and this takes forever. Is there a way in coreldraw to take this file and make it one solid line. I realize that it technically is one line as it is but it doesn't draw it as one line, it seems to chose nodes at random and then draw from that node to the next, and then go to another random node.
How did you get this file? Did you draw it? what happens if your start from a file where all your segments are connected?
But your lines are not only disconnected, they are repeated three times one on top of the other, is this intentional?
I redrew it, now all the lines are connected and there's only one line, try this file and see what happens
The file is obtained from an export of another program (unfortunately I can't publicly state what that program is). How exactly did you redraw this? I was hoping for a easy way to delete 2 of the 3 copies it makes and then combine all the lines to 1 single line, just like you did.
jrtboht
Attached is macro with three parts
removeUnderlyingDups which will do just that; remove duplicate objects (select all objects and run the macro).
NodeClean2 will then connect the segments and clean up the object from extra nodes (again, select all and run).
(ignore the third part, which doesn't have anything to do with your problem, in fact it is now built in X4)
In addition to this, you can use Reduce Nodes in Property Bar (select all nodes and press "Reduce Nodes"). This will clean up nodes further but may alter the curves a little bit , most of the times not noticeable.
In your sample file the macro could not do a perfect job, because there were segments that didn't meet correctly. It should be quite easy to correct manually though.
The macro is created by the mighty Os (wOxxOm) and should be completely safe (use it myself).
And here's the result after doing what I described.
Leunam12
The file you attached worked just fine.
Hugh
I had tried weld and while it combined everything into a single object and was one continuous line I still had the same problem of the cnc jumping around when I went to run the file.
Ronnie
The macro gave the desired results I was looking for. Is there a way to do this without the macro. I feel like I'm not learning anything if I just run the macro.
Thanks to everyone for for the help
jrtboht said:Is there a way to do this without the macro.
My advice: Use the Macro. :-)
there are no segments to connect, what I did was close the gaps, use smart drawing to redraw a new closed shape and node reduction. That's what I used to use a while ago when I had this same problem with AutoCad files, for some reason exporting from autoCAD to DXF breaks the nodes apart and when you send to CNC cutter it looks like a sewing machine, the head goes up and down every time it cuts a segment. and then it doesn't go to the next segment, it travels to a distant one, and then to another place, It takes forever.