QisMGbrip Web Page Header

QisMGbrip - High Performance Gerber Raster Application

This application is a very high performance rasterizer for Gerber(RS274X) data. It replaces both GBR_RIP and GBR2GRAYSCALE — our previous high performance RIPs. Those rasterizers are based on programming architectures which were developed more than 25 years ago and since that time Artwork has made many enhancements to rasterizers that can't be back-ported into GBR_RIP.

Further, this new RIP operates inside of our QisMLib framework which makes adding functionality to the rasterizer much easier due to the modular approach to handling large amounts of vector and bitmap data. It relies very much on two QisMLib extension libraries: QisMRaster and QisMGbrPS.


Usage

The application is driven from a command line. A summary of the command line and it's arguments is shown below:

qismgbrip64.exe {REQUIRED} [GERBER OPTIONS] [WINDOW OPTIONS] [RASTER OPTIONS] [MISC. OPTIONS]

Required Arguments

Input File Path

+input:(gbr_file_name_and_path}

the file name and path to the Gerber file (RS274X) that is to be rasterized


Output Base Path

+out:{output_dir+filename}

the filename extension is automatically generated based on the type of output bitmap selected.


Image Resolution

+resolution:{xres}[,{yres}[,{unit}|dpi]]



GERBER Options

Working Directory

-workdir:{temp_dir_path}


QisMFile units

-um


Max. points per polygon

-maxpts:{upto_8190}


Arc Resolution

-arcres:{degrees}

Chord error

-arcsag:{chord_error}[,{unit}]

Keep temporary files

-dbg


Apply Transformations

-rotate:{90x}
-mirror:x | -mirror:y | -mirror:xy
-scale:{sx}[,{sy}]

Apply Sizing

-sizing:{sizing_x},{sizing_y}[,{units}]

Advanced Gerber options

-advanced:GBR,{option}[,{option}]*

Advanced Sizing options

-advanced:SZ,{option}[,{option}]*



GDSII/OASIS/DBLOAD Options

View Layers

  • Specify a comma-separated list of layer(s) or layer:datatype(s) to be extracted. Data on all other layers will be discarded
  • e.g -layers:1,2:2,3,4:4,4:5
  • Default: Data will be sourced from all layers

  • View Cell

  • Specify the name of the cell to be extracted (view cell)
  • Default: Deepest root cell in the file will be used as the view cell

  • Window Options

    Lower left upper right

    -tile:LLUR,{lx},{ly},{ux},{uy}[,{unit}]

  • Add one tile by specifying it's lower left {lx},{ly} and upper right {ux},{uy} co-ordinates
  • {unit} if specified associates the co-ordinates of the tile in one of the following:inch, mils, cm, mm, um
  • If {unit} is omitted, the co-ordinates are assumed to be in QisMFile units

  • Lower left width height

    -tile:LLWH,{lx},{ly},{width},{height}[,{unit}]

  • Add one tile by specifying it's lower left {lx},{ly} and size {width},{height}
  • {unit} if specified associates the co-ordinates of the tile in one of the following:inch, mils, cm, mm, um
  • If {unit} is omitted, the co-ordinates are assumed to be in QisMFile units

  • Center width height

    -tile:CWH,{cx},{cy},{width},{height}[,{unit}]

  • Add one tile by specifying it's center {cx},{cy} and size {width},{height}
  • {unit} if specified associates the co-ordinates of the tile in one of the following:inch, mils, cm, mm, um
  • If {unit} is omitted, the co-ordinates are assumed to be in QisMFile units

  • Lower left upper right text file

    @tiles:LLUR,{file_path}[,{unit}]

  • Specify a list of tiles from a text file at {file_path} where each line is the lower left and upper right co-ordinates of one tile
  • {width},{height} is the size of every tile in the file
  • {unit} if specified associates the co-ordinates of the tile in one of the following:inch, mils, cm, mm, um
  • If {unit} is omitted, the co-ordinates are assumed to be in QisMFile units

  • Width height lower left text file

    @tiles:WHLL,{file_path},{width},{height}[,{unit}]

  • Specify a list of tiles from a text file at {file_path} where each line is the lower left co-ordinates of one of many equal sized tiles
  • {width},{height} is the size of every tile in the file
  • {unit} if specified associates the co-ordinates of the tile in one of the following:inch, mils, cm, mm, um
  • If {unit} is omitted, the co-ordinates are assumed to be in QisMFile units

  • Width height center text file

    @tiles:WHC,{file_path},{width},{height}[,{unit}]

  • Specify a list of tiles from a text file at {file_path} where each line is the center co-ordinate of one of many equal sized tiles
  • {width},{height} is the size of every tile in the file
  • {unit} if specified associates the co-ordinates of the tile in one of the following:inch, mils, cm, mm, um
  • If {unit} is omitted, the co-ordinates are assumed to be in QisMFile units

  • Row column tiles

    -tiles:RC,{nx},{ny}[,{lx},{ly},{ux},{uy}[,{unit}]]

  • Break the region on interest into {nx} x {ny} columns x rows of equal sized tiles
  • {lx}..{uy} if specified are the extents of the region of interest. If omitted, the home view (extents of the design) is the region of interest
  • {unit} if specified associates the co-ordinates of the tile in one of the following:inch, mils, cm, mm, um
  • If {unit} is omitted, the co-ordinates are assumed to be in QisMFile units

  • Row column tiles by size

    -tiles:WH,{width},{height}[,{unit}[,{lx},{ly},{ux},{uy}]]

  • Break the region on interest into equal sized tiles of size {width} x {height}
  • {unit} if specified associates the co-ordinates of the tile in one of the following:inch, mils, cm, mm, um
  • If {unit} is omitted, the co-ordinates are assumed to be in QisMFile units
  • {lx}..{uy} if specified are the extents of the region of interest. If omitted, the home view (extents of the default top cell) is the region of interest

  • Arbitrary clips

    -tiles:LIST,[{unit}:]{width},{height}{,{cx},{cy}}+

  • Specify an arbitrary list of points that are centers ({cx},{cy}) of equal sized ({width},{height}) tiles
  • At least one such point MUST be present
  • {unit} if specified associates the co-ordinates of the tile in one of the following:inch, mils, cm, mm, um
  • If {unit} is omitted, the co-ordinates are assumed to be in QisMFile units

  • Randomly generated clips

    -tiles:RAND,{width},{height},{count}[,{unit}[,{lx},{ly},{ux},{uy}]]

  • Generate a somewhat uniformly distributed yet randomly located list of equal size ({width},{height}) tiles
  • {count} MUST be > 0
  • {unit} if specified associates the co-ordinates of the tile in one of the following:inch, mils, cm, mm, um
  • If {unit} is omitted, the co-ordinates are assumed to be in QisMFile units
  • {lx}..{uy} if specified serves as the overall bounds a.k.a region of interest. If omitted, the home view (extents of the design) is the region of interest

  • Raster Options

    Invert image polarity

    -invert

  • If specified, the foreground (data) is white (pixel bit = 0), background is black (pixel bit = 1)

  • Reverse raster direction along X

    -right-to-left

  • If specified, the direction of rasterization is reversed along X. I.e. min-x of the data appears on the R.H.S of the image and the max-x of the data appears on the L.H.S of the image creating the appearance of the image being mirrored about it's local Y axis

  • Reverse raster direction along Y

    -bottom-to-top

  • If specified, the direction of rasterization is reversed along Y. I.e. min-y of the data appears as the first row of pixels in the image and the max-y of the data appears as the last row of pixels in the image creating the appearance of the image being mirrored about it's local X axis

  • Image file format

    -format:TIF | -format:{BTF | TIF8} | -format:RAW | -format:BMP | -format:VBMP | -format:NONE

  • Specify the output file format (and the file extension).
  • TIF refers to TIFF file format with packbits compression and 1bit/pixel (bpp).
  • BTF or TIF8 refers to Big TIFF file format with packbits compression and 1bit/pixel (bpp).
  • RAW refers to a dump of the raster image with a small header. The header is defined as follows:
    Byte 0-6 (7) : LGRAW00.
    Byte 7-10 (4) : Image width in pixels.
    Byte 11-14 (4) : Image height in pixels.
    Byte 15-22 (8) : Image size in bytes.
    Byte 23- (Image size in bytes) : Raster image dump.
  • BMP is the Bitmap file format without compression and 1bpp.
  • VBMP is same as BMP except that the height parameter in the header is positive (thereby having the same effect at -bottom-to-top depending on how the BMP reader makes use of the height paramter).
  • NONE generates the raster image but does not write it to disk.
  • Default file format is TIF

  • Dithering using a 8x8 Bayer Matrix

    -dither:{0.0_to_1.0}

    If specified, get a dithered output using a standard 8x8 Bayer matrix for a value between 0.0 and 1.0. Default: 1.0


    Force the use of large disk image rasterization

    -band:{est_buf_size_mb}[,{allocation_scheme}]

  • If specified and no. tiles = 1, force the rasterizer to use the large disk image technique.
  • By default, the rasterizer uses information such as no. tiles, raster image size and available system memory to determine the best approach for generating raster image(s). The large disk image technique is used only of no. tiles = 1 and the image size > 75% of the available system memory.
  • {est_buf_size_mb} controls how much memory to use for rasterization and formatting (writing to disk). Default is 2048 mb.

  • {allocation_scheme} controls the ratio of the amount allocated for rasterization and that for formatting depending on performance bottle-neck:

    Generate gray scale image

    -grayscale:{sample_rate},{bits_per_px}

  • If specified, the raster output is converted to gray scale.
  • Only select values are allowed for {sample_rate},{bits_per_px} based on the desired format as shown below:
    Format	                   {sample_rate},{bits_per_px}
    TIF, BTF, NONE	            2,2 2,4 2,8 4,4 4,8 8,8
    BMP, VBMP                   2,4 2,8 4,4 4,8 8,8
    

  • Misc Options

    Thread control

    -thrnum:{primary}[,{secondary}]

  • Control the number of threads to be allocation to different parts of the operation.
  • For importing Gerber, no. threads = greater value of {primary} and {secondary}.
  • For rasterization, the use of {primary} and {secondary} depends on the rasterization technique used.
  • For ONE tile:
  • For more than one tiles: {primary} controls no. tiles to be rasterized in parallel and {secondary} controls no. threads to rasterize each tile.
  • Default: {primary} = {secondary} = no. cpu(s) / 2

  • Logging

    -log:{new_log_file_path} | -log+:{append_log_file_path}

  • If specified, append to/create an execution log at the specified path

  • Run quietly in the background

    -silent

  • If specified, run quietly in the background by supressing all execution messages sent to stdout/stderr




  • Platform

    Linux - RHEL5 64 or later
    (and equivalents)

    Windows - Win 10/11
    64 bit version

    Documentation

    C++ APIs

    QisMScript Commands and equivalent C++ code

    Console Application for Exercising the Library