This page contains information about the sample C# project, demonstrating how to load and rasterize a Gerber file using the QisMLib C# extension.
The C# project serves as a starting point for developers working with QisMLib to process Gerber files. Specifically, the project demonstrates how to use the QisMLib C# extension (QisMCmdCS) to load a gerber file, rasterize it, and save it as a TIFF or BMP file on disk.
C# Interface Sample Code
02/19/25 (Zip File, 10KB)
To set up this project, extract it into the same directory as your QisMLib installation, ensuring it is placed **adjacent** to the `artwork/` directory.
The folder structure should resemble the following:
QismLib_Installation_Directory/ - artwork/ - CS_QisM_Gbrip_v100/
After extracting the project, open and build it using the solution file: 'qism_cs_gbrip_sample.sln'
The build process will generate an executable: 'CS_QisM_Gbrip.exe'
This executable will automatically be copied to the 'artwork/' directory.
Due to how the project loads the QisMLib C# extension ('qscmd_cs_s20.dll'), the executable must remain in the 'artwork/' directory to function correctly.
An example batch file ('run.bat') is included to demonstrate how to use the sample application. When executed, this batch file will generate:
The following command can be run from the sample project's directory to see the usage:
..\artwork\CS_QisM_Gbrip.exe -h CS_QisM_Gbrip v1.00 rcs(1.00) Usage: CS_QisM_Gbrip.exe [REQUIRED OPTS] [OPTIONAL OPTS] Command line: +input:..\examples\icsxseed.gbr +output:C:\WCAD\QISMLIB.v135.rls\CS_QisM_Gbrip_v100\icsxseed +dpi:5080 -log:C:\WCAD\QISMLIB.v135.rls\CS_QisM_Gbrip_v100\icsxseed.log -format:TIF -h REQUIRED +input:[filename] Path to input file +output:[path + basename] Path to save output file (w/o extension) +dpi:double DPI to rasterize image OPTIONAL -log:[path + filename] Path to save the log file -extents:[llx,lly,urx,ury] Set extents in file units: lower left x, y and upper right x, y -format:[TIF | BMP] Set the output format (default 'TIF') -h Print the usage
For more information on the QisMLib C# interface, refer to the following resources: