Index: export_openscad.c =================================================================== --- export_openscad.c (revision 31006) +++ export_openscad.c (revision 31007) @@ -235,7 +235,7 @@ scad_dump_comp(); fprintf(f, "}\n\n"); - pcb_append_printf(&layer_group_calls, " layer_group_%s();\n", scad_group_name); + rnd_append_printf(&layer_group_calls, " layer_group_%s();\n", scad_group_name); scad_group_name = NULL; scad_group_color = NULL; scad_group_level = 0; @@ -488,7 +488,7 @@ TRX(x2); TRY(y2); fix_rect_coords(); - pcb_fprintf(f, " pcb_fill_rect(%mm, %mm, %mm, %mm, %f, %f);\n", + rnd_fprintf(f, " pcb_fill_rect(%mm, %mm, %mm, %mm, %f, %f);\n", x1, y1, x2, y2, 0.0, effective_layer_thickness); } @@ -508,7 +508,7 @@ else cap_style = "rc"; - pcb_fprintf(f, " pcb_line_%s(%mm, %mm, %mm, %f, %mm, %f);\n", cap_style, + rnd_fprintf(f, " pcb_line_%s(%mm, %mm, %mm, %f, %mm, %f);\n", cap_style, x1, y1, (rnd_coord_t)rnd_round(length), angle * RND_RAD_TO_DEG, gc->width, effective_layer_thickness); } @@ -566,7 +566,7 @@ { TRX(cx); TRY(cy); - pcb_fprintf(f, " pcb_fcirc(%mm, %mm, %mm, %f);\n", cx, cy, radius, effective_layer_thickness); + rnd_fprintf(f, " pcb_fcirc(%mm, %mm, %mm, %f);\n", cx, cy, radius, effective_layer_thickness); } static void openscad_fill_polygon_offs(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y, rnd_coord_t dx, rnd_coord_t dy) @@ -574,8 +574,8 @@ int n; fprintf(f, " pcb_fill_poly(["); for(n = 0; n < n_coords-1; n++) - pcb_fprintf(f, "[%mm,%mm],", TRX_(x[n]+dx), TRY_(y[n]+dy)); - pcb_fprintf(f, "[%mm,%mm]], %f);\n", TRX_(x[n]+dx), TRY_(y[n]+dy), effective_layer_thickness); + rnd_fprintf(f, "[%mm,%mm],", TRX_(x[n]+dx), TRY_(y[n]+dy)); + rnd_fprintf(f, "[%mm,%mm]], %f);\n", TRX_(x[n]+dx), TRY_(y[n]+dy), effective_layer_thickness); } static void openscad_fill_polygon(rnd_hid_gc_t gc, int n_coords, rnd_coord_t *x, rnd_coord_t *y) @@ -640,7 +640,7 @@ fprintf(f, "polygon(["); /* iterate over the vectors of the contour */ for(go = pcb_poly_vect_first(&it, &x, &y),cnt = 0; go; go = pcb_poly_vect_next(&it, &x, &y), cnt++) - pcb_fprintf(f, "%s[%mm,%mm]", (cnt > 0 ? "," : ""), x, y); + rnd_fprintf(f, "%s[%mm,%mm]", (cnt > 0 ? "," : ""), x, y); fprintf(f, "]);\n"); } } Index: scad_draw.c =================================================================== --- scad_draw.c (revision 31006) +++ scad_draw.c (revision 31007) @@ -90,7 +90,7 @@ fprintf(f, " polygon([\n\t\t"); /* we need the as-drawn polygon and we know there are no holes */ for(n = 0; n < poly->PointN; n++) - pcb_fprintf(f, "[%mm,%mm]%s", TRX_(poly->Points[n].X), TRY_(poly->Points[n].Y), ((n < (poly->PointN-1)) ? "," : "\n")); + rnd_fprintf(f, "[%mm,%mm]%s", TRX_(poly->Points[n].X), TRY_(poly->Points[n].Y), ((n < (poly->PointN-1)) ? "," : "\n")); fprintf(f, " ]);\n"); fprintf(f, "}\n"); @@ -110,8 +110,8 @@ TODO("padstack: this ignores bbvias") TODO("slot: this ignores slots") if (proto->hdia > 0) { - pcb_fprintf(f, " translate([%mm,%mm,0])\n", TRX_(ps->x), TRY_(ps->y)); - pcb_fprintf(f, " cylinder(r=%mm, h=4, center=true, $fn=30);\n", proto->hdia/2); + rnd_fprintf(f, " translate([%mm,%mm,0])\n", TRX_(ps->x), TRY_(ps->y)); + rnd_fprintf(f, " cylinder(r=%mm, h=4, center=true, $fn=30);\n", proto->hdia/2); } } Index: scad_models.c =================================================================== --- scad_models.c (revision 31006) +++ scad_models.c (revision 31007) @@ -62,7 +62,7 @@ fprintf(f, "%s", buff); } fclose(fin); - pcb_snprintf(buff, sizeof(buff), "pcb_part_%s", safe_name); + rnd_snprintf(buff, sizeof(buff), "pcb_part_%s", safe_name); htsp_set(models, (char *)name, rnd_strdup(buff)); free(safe_name); } @@ -75,28 +75,28 @@ if (ref != NULL) { char tab[] = "\t\t\t\t\t\t\t\t"; int ind = 0; - pcb_append_printf(&model_calls, " translate([%mm,%mm,%c0.8])\n", x0, y0, on_bottom ? '-' : '+'); + rnd_append_printf(&model_calls, " translate([%mm,%mm,%c0.8])\n", x0, y0, on_bottom ? '-' : '+'); ind++; tab[ind] = '\0'; if (on_bottom) { - pcb_append_printf(&model_calls, " %smirror([0,0,1])\n", tab); + rnd_append_printf(&model_calls, " %smirror([0,0,1])\n", tab); tab[ind] = '\t'; ind++; tab[ind] = '\0'; } if (rot != 0) { - pcb_append_printf(&model_calls, " %srotate([0,0,%f])\n", tab, rot); + rnd_append_printf(&model_calls, " %srotate([0,0,%f])\n", tab, rot); tab[ind] = '\t'; ind++; tab[ind] = '\0'; } if (transf != NULL) { - pcb_append_printf(&model_calls, " %s%s\n", tab, transf); + rnd_append_printf(&model_calls, " %s%s\n", tab, transf); tab[ind] = '\t'; ind++; tab[ind] = '\0'; } if (param != NULL) - pcb_append_printf(&model_calls, " %s%s(%s);\n", tab, ref, param); + rnd_append_printf(&model_calls, " %s%s(%s);\n", tab, ref, param); else - pcb_append_printf(&model_calls, " %s%s();\n", tab, ref); + rnd_append_printf(&model_calls, " %s%s();\n", tab, ref); } }