Index: bus.c =================================================================== --- bus.c (revision 31019) +++ bus.c (revision 31020) @@ -236,7 +236,7 @@ bus_seg_calc(l); x = l->Point1.X; y = l->Point1.Y; - for(o = 0; o < len; o += PCB_MM_TO_COORD(5), x += vx*PCB_MM_TO_COORD(5), y += vy*PCB_MM_TO_COORD(5)) + for(o = 0; o < len; o += RND_MM_TO_COORD(5), x += vx*RND_MM_TO_COORD(5), y += vy*RND_MM_TO_COORD(5)) rnd_render->draw_line(pcb_draw_out.fgGC, x + nx * bus->vthickness/2, y + ny * bus->vthickness/2, x - nx * bus->vthickness/2, y - ny * bus->vthickness/2); Index: cord.c =================================================================== --- cord.c (revision 31019) +++ cord.c (revision 31020) @@ -151,7 +151,7 @@ y = rnd_round(it3*e1->y + 3*it2*t*a1->Y + 3*it*t2*a2->Y + t3*e2->y); l = pcb_line_new(lyr, lx, ly, x, y, - PCB_MM_TO_COORD(0.25), 0, pcb_flag_make(0)); + RND_MM_TO_COORD(0.25), 0, pcb_flag_make(0)); rnd_attribute_put(&l->Attributes, "extobj::role", "gfx"); set_grp((pcb_any_obj_t *)l, group); @@ -161,7 +161,7 @@ } else { l = pcb_line_new(lyr, e1->x, e1->y, e2->x, e2->y, - PCB_MM_TO_COORD(0.25), 0, pcb_flag_make(0)); + RND_MM_TO_COORD(0.25), 0, pcb_flag_make(0)); rnd_attribute_put(&l->Attributes, "extobj::role", "gfx"); set_grp((pcb_any_obj_t *)l, group); } @@ -209,7 +209,7 @@ if ((floater->type == PCB_OBJ_LINE) && (rnd_attribute_get(&subc->Attributes, "extobj::fixed_origin") == NULL)) { pcb_pstk_t *ps = (pcb_pstk_t *)floater; - pcb_subc_move_origin_to(subc, ps->x + PCB_MM_TO_COORD(0.3), ps->y + PCB_MM_TO_COORD(0.3), 0); + pcb_subc_move_origin_to(subc, ps->x + RND_MM_TO_COORD(0.3), ps->y + RND_MM_TO_COORD(0.3), 0); } } @@ -259,7 +259,7 @@ proto.tr.array = &tshp; shape.shape = PCB_PSSH_CIRC; - shape.data.circ.dia = PCB_MM_TO_COORD(0.5); + shape.data.circ.dia = RND_MM_TO_COORD(0.5); shape.data.circ.x = shape.data.circ.y = 0; shape.layer_mask = lyt; @@ -276,7 +276,7 @@ static pcb_pstk_t *endpt_pstk(pcb_subc_t *subc, const char *ptidx, rnd_cardinal_t pid, rnd_coord_t x, rnd_coord_t y, rnd_coord_t ox, rnd_coord_t oy, const char *term, const char *grp, int floater) { pcb_pstk_t *ps; - rnd_coord_t dx = ox-x, dy = oy-y, cpx = x+dx/4, cpy = y+dy/4, cpr = PCB_MM_TO_COORD(0.5); + rnd_coord_t dx = ox-x, dy = oy-y, cpx = x+dx/4, cpy = y+dy/4, cpr = RND_MM_TO_COORD(0.5); pcb_layer_t *ely = &subc->data->Layer[LID_EDIT]; @@ -310,7 +310,7 @@ static void conv_pstk(pcb_subc_t *subc, pcb_pstk_t *ps, long *grp, long *term, int *has_origin) { char sgrp[16], sterm[16]; - rnd_coord_t d = PCB_MM_TO_COORD(0.75); + rnd_coord_t d = RND_MM_TO_COORD(0.75); sprintf(sgrp, "%ld", (*grp)++); @@ -320,7 +320,7 @@ endpt_pstk(subc, "1", SILK_END, ps->x, ps->y, ps->x+d, ps->x+d, ps->term, sgrp, 0); if (!*has_origin) { - pcb_subc_move_origin_to(subc, ps->x + PCB_MM_TO_COORD(0.3), ps->y + PCB_MM_TO_COORD(0.3), 0); + pcb_subc_move_origin_to(subc, ps->x + RND_MM_TO_COORD(0.3), ps->y + RND_MM_TO_COORD(0.3), 0); *has_origin = 1; } @@ -360,8 +360,8 @@ layers[1].lyt = pcb_layer_flags_(l->parent.layer); pcb_layer_purpose_(l->parent.layer, &layers[1].purpose); if (!has_origin) { - ox = l->Point1.X + PCB_MM_TO_COORD(0.3); - oy = l->Point1.Y + PCB_MM_TO_COORD(0.3); + ox = l->Point1.X + RND_MM_TO_COORD(0.3); + oy = l->Point1.Y + RND_MM_TO_COORD(0.3); has_origin = 1; } break; Index: dimension.c =================================================================== --- dimension.c (revision 31019) +++ dimension.c (revision 31020) @@ -150,7 +150,7 @@ pcb_layer_t *ly; pcb_line_t *flt; double ang, deg, dispe, rotsign; - double arrx = PCB_MM_TO_COORD(2), arry = PCB_MM_TO_COORD(0.5); + double arrx = RND_MM_TO_COORD(2), arry = RND_MM_TO_COORD(0.5); rnd_coord_t x1, y1, x2, y2, x1e, y1e, x2e, y2e, tx, ty, x, y, ex, ey; pcb_text_t *t; char ttmp[128]; @@ -174,7 +174,7 @@ y2 = rnd_round(dim->y2 + dim->displace * +dim->dx); /* endpoints of the extended-displaced baseline */ - dispe = PCB_MM_TO_COORD(0.5); + dispe = RND_MM_TO_COORD(0.5); if (dim->displace < 0) dispe = -dispe; dispe = dim->displace + dispe; @@ -190,7 +190,7 @@ flt = pcb_line_new(ly, x1 + arrx * dim->dx, y1 + arrx * dim->dy, x2 - arrx * dim->dx, y2 - arrx * dim->dy, - PCB_MM_TO_COORD(0.25), 0, pcb_flag_make(PCB_FLAG_FLOATER)); + RND_MM_TO_COORD(0.25), 0, pcb_flag_make(PCB_FLAG_FLOATER)); rnd_attribute_put(&flt->Attributes, "extobj::role", "dimline"); } else { /* modify the floater if it exists */ @@ -206,8 +206,8 @@ } /* guide lines */ - pcb_line_new(ly, dim->x1, dim->y1, x1e, y1e, PCB_MM_TO_COORD(0.25), 0, pcb_flag_make(0)); - pcb_line_new(ly, dim->x2, dim->y2, x2e, y2e, PCB_MM_TO_COORD(0.25), 0, pcb_flag_make(0)); + pcb_line_new(ly, dim->x1, dim->y1, x1e, y1e, RND_MM_TO_COORD(0.25), 0, pcb_flag_make(0)); + pcb_line_new(ly, dim->x2, dim->y2, x2e, y2e, RND_MM_TO_COORD(0.25), 0, pcb_flag_make(0)); /* arrows */ draw_arrow(dim, subc->data, ly, x1, y1, arrx, arry); @@ -290,7 +290,7 @@ rnd_trace("new disp: %mm f=%mm;%mm\n", (rnd_coord_t)d, fx, fy); - if ((d > -PCB_MM_TO_COORD(0.1)) && (d < PCB_MM_TO_COORD(0.1))) + if ((d > -RND_MM_TO_COORD(0.1)) && (d < RND_MM_TO_COORD(0.1))) return; rnd_trace("let's do it!\n"); Index: line_of_vias.c =================================================================== --- line_of_vias.c (revision 31019) +++ line_of_vias.c (revision 31020) @@ -134,7 +134,7 @@ line_of_vias_unpack(subc); lov = subc->extobj_data; - if (lov->pitch < PCB_MM_TO_COORD(0.001)) { + if (lov->pitch < RND_MM_TO_COORD(0.001)) { rnd_message(RND_MSG_ERROR, "line_of_vias_gen(): can not generate line-of-vias, pitch value is too small\n"); return -1; } @@ -158,8 +158,8 @@ static void draw_mark_line(pcb_draw_info_t *info, pcb_subc_t *subc, pcb_line_t *line) { int selected; - double disp = PCB_MM_TO_COORD(0.05); - double arrow = PCB_MM_TO_COORD(0.2); + double disp = RND_MM_TO_COORD(0.05); + double arrow = RND_MM_TO_COORD(0.2); double ax, ay, ax1, ay1, ax2, ay2; line_geo_def; rnd_coord_t x1 = line->Point1.X, y1 = line->Point1.Y, x2 = line->Point2.X, y2 = line->Point2.Y;