Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 31741) +++ trunk/src/obj_line.c (revision 31742) @@ -171,13 +171,6 @@ jmp_buf env; }; -typedef enum { - PCB_LINMER_NONE = 0, /* no merge is possible */ - PCB_LINMER_REMPT = 1, /* remove both endpoints passed back in out */ - PCB_LINMER_SKIP = 2 /* do not create the new line at all */ -} pcb_line_merge_t; - -/* returns 0 if , 1 if merge is done, */ RND_INLINE int can_merge_lines(const pcb_line_t *old_line, const pcb_line_t *new_line, pcb_line_t *out) { /* do not merge to subc parts or terminals */ @@ -239,6 +232,12 @@ return PCB_LINMER_NONE; } +int pcb_line_can_merge_lines(const pcb_line_t *old_line, const pcb_line_t *new_line, pcb_line_t *out) +{ + return can_merge_lines(old_line, new_line, out); +} + + static rnd_r_dir_t line_callback(const rnd_rnd_box_t * b, void *cl) { int res; Index: trunk/src/obj_line.h =================================================================== --- trunk/src/obj_line.h (revision 31741) +++ trunk/src/obj_line.h (revision 31742) @@ -116,7 +116,16 @@ start and the new end. */ double pcb_drc_lines(pcb_board_t *pcb, const rnd_point_t *start, rnd_point_t *end, rnd_point_t *mid_out, rnd_bool way, rnd_bool optimize); +/*** decide if two liens are overlapping in a way they can be simplified ***/ +typedef enum { + PCB_LINMER_NONE = 0, /* no merge is possible */ + PCB_LINMER_REMPT = 1, /* remove both endpoints passed back in out */ + PCB_LINMER_SKIP = 2 /* do not create the new line at all */ +} pcb_line_merge_t; +int pcb_line_can_merge_lines(const pcb_line_t *old_line, const pcb_line_t *new_line, pcb_line_t *out); + + /* Rather than mode the line bounding box, we set it so the point bounding * boxes are updated too. */