Index: write.c =================================================================== --- write.c (revision 31019) +++ write.c (revision 31020) @@ -711,7 +711,7 @@ int layer = 0; int currentKicadLayer = 0; int currentGroup = 0; - rnd_coord_t outlineThickness = PCB_MIL_TO_COORD(10); + rnd_coord_t outlineThickness = RND_MIL_TO_COORD(10); int bottomCount; rnd_layer_id_t *bottomLayers; @@ -747,22 +747,22 @@ TODO(": se this from io_kicad, do not duplicate the code here") /* we sort out the needed kicad sheet size here, using A4, A3, A2, A1 or A0 size as needed */ - if (PCB_COORD_TO_MIL(PCB->hidlib.size_x) > A4WidthMil || PCB_COORD_TO_MIL(PCB->hidlib.size_y) > A4HeightMil) { + if (RND_COORD_TO_MIL(PCB->hidlib.size_x) > A4WidthMil || RND_COORD_TO_MIL(PCB->hidlib.size_y) > A4HeightMil) { sheetHeight = A4WidthMil; /* 11.7" */ sheetWidth = 2 * A4HeightMil; /* 16.5" */ paperSize = 3; /* this is A3 size */ } - if (PCB_COORD_TO_MIL(PCB->hidlib.size_x) > sheetWidth || PCB_COORD_TO_MIL(PCB->hidlib.size_y) > sheetHeight) { + if (RND_COORD_TO_MIL(PCB->hidlib.size_x) > sheetWidth || RND_COORD_TO_MIL(PCB->hidlib.size_y) > sheetHeight) { sheetHeight = 2 * A4HeightMil; /* 16.5" */ sheetWidth = 2 * A4WidthMil; /* 23.4" */ paperSize = 2; /* this is A2 size */ } - if (PCB_COORD_TO_MIL(PCB->hidlib.size_x) > sheetWidth || PCB_COORD_TO_MIL(PCB->hidlib.size_y) > sheetHeight) { + if (RND_COORD_TO_MIL(PCB->hidlib.size_x) > sheetWidth || RND_COORD_TO_MIL(PCB->hidlib.size_y) > sheetHeight) { sheetHeight = 2 * A4WidthMil; /* 23.4" */ sheetWidth = 4 * A4HeightMil; /* 33.1" */ paperSize = 1; /* this is A1 size */ } - if (PCB_COORD_TO_MIL(PCB->hidlib.size_x) > sheetWidth || PCB_COORD_TO_MIL(PCB->hidlib.size_y) > sheetHeight) { + if (RND_COORD_TO_MIL(PCB->hidlib.size_x) > sheetWidth || RND_COORD_TO_MIL(PCB->hidlib.size_y) > sheetHeight) { sheetHeight = 4 * A4HeightMil; /* 33.1" */ sheetWidth = 4 * A4WidthMil; /* 46.8" */ paperSize = 0; /* this is A0 size; where would you get it made ?!?! */ @@ -770,17 +770,17 @@ fprintf(FP, "Sheet A%d ", paperSize); /* we now sort out the offsets for centring the layout in the chosen sheet size here */ - if (sheetWidth > PCB_COORD_TO_MIL(PCB->hidlib.size_x)) { /* usually A4, bigger if needed */ + if (sheetWidth > RND_COORD_TO_MIL(PCB->hidlib.size_x)) { /* usually A4, bigger if needed */ fprintf(FP, "%d ", sheetWidth); /* legacy kicad: elements decimils, sheet size mils */ - LayoutXOffset = PCB_MIL_TO_COORD(sheetWidth) / 2 - PCB->hidlib.size_x / 2; + LayoutXOffset = RND_MIL_TO_COORD(sheetWidth) / 2 - PCB->hidlib.size_x / 2; } else { /* the layout is bigger than A0; most unlikely, but... */ rnd_fprintf(FP, "%.0ml ", PCB->hidlib.size_x); LayoutXOffset = 0; } - if (sheetHeight > PCB_COORD_TO_MIL(PCB->hidlib.size_y)) { + if (sheetHeight > RND_COORD_TO_MIL(PCB->hidlib.size_y)) { fprintf(FP, "%d", sheetHeight); - LayoutYOffset = PCB_MIL_TO_COORD(sheetHeight) / 2 - PCB->hidlib.size_y / 2; + LayoutYOffset = RND_MIL_TO_COORD(sheetHeight) / 2 - PCB->hidlib.size_y / 2; } else { /* the layout is bigger than A0; most unlikely, but... */ rnd_fprintf(FP, "%.0ml", PCB->hidlib.size_y);