PDA

View Full Version : Tiny polylines/arc modification in dxf



Mike Lysov
09-24-2013, 5:57 PM
Hi guys,

It seems my laser control software generates very bad g-code for arcs or polylines that are quite small, less than 0.3mm in length.

Does anybody know any tool/software either free or up to $100 that can scan dxf file, find all curves that are less than specified length and ether has a functionality to weld them with the next segment automatically or provides tools to modify them manually.

Macro for CorelDraw that can specify minimum polyline / arc length for DXF export will work for me too.

I currently do my artwork in CorelDraw and modify all curves to make sure there are no tiny segments but after I export it to DXF using eCut macros sometime it generates DXF with either polylines or arcs that are very small in length.

I would prefer to keep using DXF Export from eCut macros and use third party tool to check the DXF and to get read of tiny segments. However if there is a better macro for DXF export for CorelDraw that allows to specify a minimum arc/polyline length I do not mind to switch to it.

I have checked DXFTools as an alternative but it does not provide any option to specify minimum length for arcs or polylines.

Mike Null
09-24-2013, 6:15 PM
Have a look at this. http://www.oberonplace.com/vba/drawmacros/index.htm

Mike Lysov
09-24-2013, 6:22 PM
Have a look at this. http://www.oberonplace.com/vba/drawmacros/index.htm

Hi Mike,

which one of them? I cannot see any that can do DXF export.

matthew knott
09-24-2013, 6:38 PM
Corel Draw has built in DXF & DWG export filters, simply Export it as a DXF directly in corel and see if its any better !

Mike Lysov
09-24-2013, 6:47 PM
Hi Mathew,

I have tried it. It is much worse with splines instead of arcs and polylines.

Dave Sheldrake
09-24-2013, 8:32 PM
Mike,

AutoCAD DXFr14 format will automatically convert splines to polys (the DXFr14 format doesn't support splines so reads/writes them as arcs and lines)(unless corel really has got that bad)

cheers

Dave

Mike Null
09-24-2013, 9:10 PM
Mike

I thought curve works might be of help.

Mike Lysov
09-25-2013, 6:54 AM
I am trying to find now that shape with the same settings for DXF export that caused troubles last time. Since it was my customer order that I had to finish and post asap I was trying to play with its tolerance for DXF export until I found settings that fixed it. Now I cannot replicate the same problem. It cuts nice without any weird G-Code while there is still a tiny line(see current working gcode at the bottom).

So I am not even sure that all the problems I had last time was caused by a tiny in length line. It seems the laser has no problems to do very short lines.


Now I think it was an arc command that supposed to finish the shape because the tiny line is a beginning of commands for the whole shape. It is a kind of a tall rectangle and it is cut out from the top. The problem was at the end of cutting it. When it was supposed to be finished the laser did not stop(see attached image) and kept moving further. The blue is the shape I wanted to cut and the red line along which the laser kept moving when the shape was finished. The red line was much longer, in fact I had to abort the program. It was probably not the line at all, possibly an arc with a very huge offset.

Since I cannot find what settings what used I can only post the code that works fine now. The shape is exactly the same in geometry and size but the one that has caused problems was at a different position on a bed and it was rotated to use free space on a sheet of MDF.


G00X241.059Y487.903(the top of the rectangle)
.....
.....
.....


G01X240.896Y487.205
G03X232.942Y450.248I964.123J-226.836
G02X231.181Y443.193I-86.363J17.810
G03X230.178Y438.171I40.891J-10.778
G02X235.284Y438.571I34.270J-404.669
G03X245.275Y439.715I-157.598J1420.567
G02X244.701Y444.363I131.959J18.656
G02X242.826Y463.387I217.531J31.044
G03X241.059Y487.903I-712.619J-39.041

Mike Null
09-25-2013, 10:02 AM
By coincidence this arrived this morning. http://graphics-unleashed.unleash.com/2013/07/macros-to-prepare-coreldraw-files-for.html

Mike Lysov
09-25-2013, 8:39 PM
Thank you Mike. I am aware about DXFTools macro. Quite expensive tool though($190) and it looks like it does the same as e-cut macro that costs only $50 but comes with a lot of other functions.

It seems I will need to find what causing bad g-code generation from a good DXF first.
Based on my experiments yesterday a small segment does not generate it.
Is it possible that shape repositioning or its rotation in laser control software can do such a things?

Of course considering that it is a bug in my laser control software.

Dan Hintz
09-26-2013, 6:20 AM
It seems I will need to find what causing bad g-code generation from a good DXF first.

Is it possible that shape repositioning or its rotation in laser control software can do such a things?

This would be my guess... it's an easy operation to screw up from a coding standpoint.