kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #00421
Suggested changes to strings identifying layers within PCB files
--0-151120846-1184905683=:14142 Content-Type: text/plain; charset=ascii
Greetings,
While experimenting with creating plot outputs (HPGL files, Gerber files, and postscript files) from PCB files, I found that if I specified generating a file for the "Edges Pcb" layer, then the resulting corresponding file incorporated a space within its name.
As one example, while I had the C:\Kicad\demos\video\video.brd file open, and selected HPGL as the "Plot Format" option, one of the files that was subsequently generated had the name of "C:\Kicad\demos\video\video-Edges Pcb.plt".
In the cases of the files corresponding to all of the remaining layers, there were no spaces within their names (or at least not whenever the "source" PCB file incorporated no spaces within its name). I think that it is very undesirable for any of these files to incorporate spaces within their names, as it can result in reduced user-friendliness when attempting to open those files in other applications.
After looking through the current version of the source code, I found that the names assigned to each output file were determined by the strings specified within layer_name_list_for_filename[], incorporated within the ReturnPcbLayerName function, in turn contained within the Kicad\Trunk\Kicad\common\common.cpp file. And a comment on line 249 within that file (referring to the strings specified within layer_name_list_for_filename[]) states "Same as layer_name_list, without space, not internationalized", which does imply that it was not intended that there should be any spaces within any of the associated strings.
As such, I have recently uploaded a Common.diff file (created using TortoiseSVN) to the Files page of this mailing list, so I am hoping that somebody will subsequently patch that file and then commit it.
If unchanged, the contents within that patch would also modify the string returned by the ReturnPcbLayerName function in the case of the (Solder) Mask layer on the Copper layer. Up until now, the associated string has either been "Mask Copp" (layer_name_list[]) or "MaskCopp" (layer_name_list_for_filename[]); if the changes I have made are accepted, the associated strings will subsequently be "Mask Cop " or "MaskCop" (respectively). Changing those strings as described would make the identification of that layer more consistent with the naming style used for all of the remaining layers of a paired nature (i.e. the Adhesive layers, Solder Paste layers, (Solder) Mask layers, and Silk Screen layers).
Regards,
Geoff Harland.
____________________________________________________________________________________ Yahoo!7 Mail has just got even bigger and better with unlimited storage on all webmail accounts.
http://au.docs.yahoo.com/mail/unlimitedstorage.html
--0-151120846-1184905683=:14142 Content-Type: text/html; charset=ascii
<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV><FONT size=2>
<P>Greetings,</P>
<P> </P>
<P>While experimenting with creating plot outputs (HPGL files, Gerber files, and postscript files) from PCB files, I found that if I specified generating a file for the "Edges Pcb" layer, then the resulting corresponding file incorporated a space within its name.</P>
<P> </P>
<P>As one example, while I had the C:\Kicad\demos\video\video.brd file open, and selected HPGL as the "Plot Format" option, one of the files that was subsequently generated had the name of "C:\Kicad\demos\video\video-Edges Pcb.plt".</P>
<P> </P>
<P>In the cases of the files corresponding to all of the remaining layers, there were no spaces within their names (or at least not whenever the "source" PCB file incorporated no spaces within its name). I think that it is very undesirable for any of these files to incorporate spaces within their names, as it can result in reduced user-friendliness when attempting to open those files in other applications.</P>
<P> </P>
<P>After looking through the current version of the source code, I found that the names assigned to each output file were determined by the strings specified within layer_name_list_for_filename[], incorporated within the ReturnPcbLayerName function, in turn contained within the Kicad\Trunk\Kicad\common\common.cpp file. And a comment on line 249 within that file (referring to the strings specified within layer_name_list_for_filename[]) states "Same as layer_name_list, without space, not internationalized", which does imply that it was not intended that there should be any spaces within any of the associated strings.</P>
<P> </P>
<P>As such, I have recently uploaded a Common.diff file (created using TortoiseSVN) to the Files page of this mailing list, so I am hoping that somebody will subsequently patch that file and then commit it.</P>
<P> </P>
<P>If unchanged, the contents within that patch would also modify the string returned by the ReturnPcbLayerName function in the case of the (Solder) Mask layer on the Copper layer. Up until now, the associated string has either been "Mask Copp" (layer_name_list[]) or "MaskCopp" (layer_name_list_for_filename[]); if the changes I have made are accepted, the associated strings will subsequently be "Mask Cop " or "MaskCop" (respectively). Changing those strings as described would make the identification of that layer more consistent with the naming style used for all of the remaining layers of a paired nature (i.e. the Adhesive layers, Solder Paste layers, (Solder) Mask layers, and Silk Screen layers).</P>
<P> </P>
<P>Regards,</P>
<P>Geoff Harland.</P>
<P> </P></FONT></DIV></div><br>
<hr size=1>
Yahoo!7 Mail has just got even bigger and better with unlimited storage on all webmail accounts. <a href="http://au.docs.yahoo.com/mail/unlimitedstorage.html" target=_blank>Find out more</a>.</body></html> --0-151120846-1184905683=:14142--
Follow ups