View Full Version : Line Smoothing, point /line no identification


dz1
10-08-2007, 11:39 AM
Going to be posting a new (small) project soon. Needed the following:

- way to easily strip all negative Z offsets from traditional CAM program for using program with plasma table

- way to smooth out curves composed of an ton of G1 points so machine would run faster/smoother

- way to corrolate line numbers with points in a drawn display so I can exclude a certain range of code lines from the smoothing operation

done with 1 and 2, just finishing up 3. if anyone has any other ideas for useful features that arent huge let me know. (will be open source)

features like using it to just renumber lines can be done trivially at this point.

works by parsing/manipulating CAM generated gcode files not graphics based
images

grantman
10-27-2007, 08:08 PM
I have been looking for a G-code smoothing program that would eliminate small z moves as in the codes shown below.

X1.8959 Y-.212
X1.8942 Y-.2261
X1.8925 Y-.2403
X1.8907 Y-.2544 Z.0251
X1.8887 Y-.2686 Z.025
X1.8866 Y-.2827
X1.8845 Y-.2968
X1.8822 Y-.311
X1.8799 Y-.3247
X1.8773 Y-.3392
X1.8747 Y-.3534 Z.0251
X1.872 Y-.3675
X1.8691 Y-.3816 Z.025
X1.8662 Y-.3958
X1.8657 Y-.398
X1.8632 Y-.4099 Z.0251

It should be simple enough. Let me know what you think.

Grantman

dz1
10-28-2007, 03:35 AM
good idea grantman, will add that and allow user to specify how much difference to ignore

will probably upload this weekend sometime.

dz1
10-28-2007, 05:42 AM
attached, please see readme.txt before use

as always safety is up to the operator, no results guaranteed standard disclaimer blah blah

requires vb6 runtimes and comctl32.ocx

grantman
11-03-2007, 09:04 AM
Thanks DZ1,

I'll check out your program and let you know what I think.

grantman
11-03-2007, 09:28 AM
DZ1,

Worked great. Eliminated hundreds of small z moves that previously made small
gouges in my parts. Thanks again!

ger21
11-03-2007, 09:49 AM
Does this combine small moves into longer straight moves, or does it combine them into arcs?

dz1
11-03-2007, 11:23 AM
glad to hear it worked well for you grantman :)

ger21, it only removes G1 points does not ( or rather shouldnt :) touch any arcs...so a smooth of 3 would take out 3 sequential G1 points skip one, take out another 3, most of my parts are from bitmap traces so all i ever get is g1 point clouds

one possible bug i have encouintered is if you have a section with a striaght line like for a framed piece, if you dont exclude teh right lines of code you might end up with a not so stright line as one of the square points of the frame got wacked...thats where the feature to figure out which point is which line number and the exclude/include lines feature comes in

Paul_S
12-15-2007, 06:03 AM
Data points unless they lie on an axis plain cannot be readily made into arcs. But points along an axis plain can be grouped in 3's and made into short connecting tangential and non-tangential arcs. for smoother moves.