Draft mapping files/es

El módulo de Croquis es capaz de importar archivos creados en cualquier programa capaz de exportar archivos DXF. Pero debido a que FreeCAD es muy diferente a AutoCAD and other usual 2D CAD programs, you might want to translate automatically the way DXF entities appear in FreeCAD.

Por ejemplo los programas de CAD 2D frecuentemente utilizan un fondo negro, de modo que dibujas utilizando colores brillantes, como amarillo, verde, etc. Luego, cuando quieres imprimir tus dibujos, esos colores son traducidos al color negro con distintos espesores de línea.

Ya que FreeCAD no es un clon de AutoCAD, no necesitamos aguantar esos desagradables colores. Los conceptos de colores, espesor de línea, o capas son en realidad muy diferentes en FreeCAD. De modo que, podemos aprovechar este nuevo entorno y trabajar, por ejemplo, con líneas negras sobre un fondo blanco. También podemos utilizar diferentes espesores de línea, de modo que nuestros dibujos se parezcan bastante en pantalla a como serán impresos (observa que la impresión de planos desde FreeCAD aún no está soportada, un poco más de paciencia!).

Para use a mapping file, simply navigate to Edit -> Preferences -> Draft -> dxf settings and select those two options:
 * Import style: Map colors to linewidths
 * Mapping file: navigate to a .csv file (see below)

These settings will then be your defaults next time you import a DXF file.

The Draft module accepts two types of .csv (comma- or tab-separated file) as mapping file:

converting from autocad plot styles
AutoCAD saves its plot styles as .CTB files. If you open your plot style manager from AutoCAD, you will actually open an explorer window showing the location where those files are saved. The DXF importer cannot use these files directly because, you will have guessed, they are encoded. Fortunately, there is a nice free CTB viewer & converter that can convert CTB files to TAB-separated CSV files. The .csv files generated by this program can be used immediately, they can also be edited with any spreadsheet application.

making your own .csv files
Making your own mapping files is very easy too. It can be made in a spreadsheet application or in any text editor. The rule is simple: you need 3 columns separated by a tabulation (hit the TAB key). First column is the AutoCAD color, second column is the FreeCAD linecolor RGB value formatted like this: 255,255,255 and the third column is the FreeCAD linewidth in pixels. The first line won't be read. So, you can make one like this, for example:

The above table would convert color 1 (red) to black (0,0,0)/1 pixel, color 2 (yellow) to black/2 pixels, color 8 (darkgrey) to some dark shade of grey(80,80,80) and 1 pixel wide, etc, etc. You can specify only the colors that you need. What you didn't specify will receive default color/linewidth.

Don't forget that the first line won't be used, so you can use it for writing column titles for example. If you write a .csv file in a spreadsheet application (such as OpenOffice), be careful that sometimes your spreadsheet will think that something written 100,100,100 is one number (hundred million one hundred thousand hundred) and will want to remove the commas. Also, when you save the file as .csv, be sure to specify that it must be TAB-separated and not COMMA-separated.