Overview of the QisMLib API

how clipextract fits into the QisMLib environment





ClipExtract Command Line Reference

ClipExtract v2.03

last updated March 22, 2017


The command line takes the form:

clipextract                 full path and file name of executable

 <input_file>               input GDSII file

  <output_dir>              output directory; this directory must
                            already exist.

   [file_options]           which cell, layers to process
                            whether to load from disk

    <window_spec>           one of a number of methods to specify
                            a window or windows.

     <format>               type of clip: image or vector

      [format_options]      controlling details of the selected output format

         [misc_options]     threads, logging and messaging.

-----------------------

+input:<input_file>         a valid GDSII file from which to extract the clips.
                            Use the full path and name.
                            Examples
                            +input:D:\cad_data\test\demo5.gds
                            "+input:D:\cad_data\test files\demo 5.gds"


+outdir:<output_dir>        specify a path where the output file(s) will be created.
                            this directory must exist prior to execution.
                            Examples
                            +output:D:\cad_data\test\output
                            "+output:D:\cad data\test\output files"


-----------------------

 -layers:<LAYERS>           specify a comma delimited list of layer and/or
                            layer:datatype to be loaded prior to extraction.
                            Examples
                            -layers:1,2:2,3,4:4,4:5
                            if the datatype is omitted, all datatypes for the corresponding
                            layer will be loaded.
                            Any entities with layer/datatype that don't match this specification
                            will be filtered out.
                            If -layers is not used, all layers/datatypes are loaded by default.



-cell:<CELL>                specify the name ofthe cell to be used as the "view" cell from
                            which clips will be extracted. By default, the deepest top cell is
                            used as the view cell.
                            Are cell names case sensitive?
                            if cell name has a space can we delimit with quotations?

-loadfromdisk               By default clipextract loads GDSII entity data into memory at load. 
                            If this directive is present, such data is loaded from disk when needed. 
                            This reduces the memory footprint but will slow down data access.

----------------------

Window Specifications - Specify at least one of the following directives. There are directives
for specifying a single window, reading a list of windows from a text file and automatically
dividing a region into "tiles."


-window:LLUR:<FILENAME>:<LLX>,<LLY>,<URX>,<URY>

                            specify a window using its lower left and upper right co-ordinates 
                            in the GDSII file units.
                            The filename is used to identify the file generated from this window
                            Filename is built from OUTPUT_DIR + FILENAME + EXTENSION


-window:LLWH:<FILENAME>:<LLX>,<LLY>,<WIDTH>,<HEIGHT>

                            specify a window using its lower left co-ordinates, width and
                            height in the GDSII file units.


-window:CWH:<FILENAME>:<CX>,<CY>,<WIDTH>,<HEIGHT>

                            specify a window using its center co-ordinates, width and
                            height in the GDSII file units.


(from a text file)

@window:LLUR:<FILENAME>:<FILE-PATH>

                            specify a path and filename. This file should contain a list of
                            windows. Each line has <LLX>,<LLY>,<URX>,<URY>
                            Examples
                            @window:LLUR:d:\cad_data\test\clip_window.txt

                            clip_window.txt 
                            219.123,249.235,235.125,265.237
                            62.672,384.775,78.674,400.777
                            68.717,328.786,84.719,344.788
                            371.328,143.587,387.330,159.589
                            216.170,263.576,232.172,279.578
                            125.772,61.709,141.774,77.711
                            310.043,250.966,326.045,266.968
                            293.848,142.785,309.850,158.787
                            223.535,222.867,239.537,238.869
                            170.410,408.294,186.412,424.296
                            262.594,418.516,278.596,434.518
                            222.133,195.658,238.135,211.660
                            82.296,184.339,98.298,200.341
                            213.825,173.288,229.827,189.290
                            30.744,284.310,46.746,300.312

   
                            The filename is used to identify the files generated from this window
                            Filename is built from OUTPUT_DIR + FILENAME + LINE_NUMBER + EXTENSION


@window:LLUR:<FILENAME>:<FILE-PATH>

                            specify a path and filename. This file should contain a list of
                            windows. Each line has <LLX>,<LLY>,<WIDTH>,<HEIGHT>
                            Examples
                            @window:LLWH:d:\cad_data\test\clip_window.txt

                            clip_window.txt 
                            219.123,249.235,16,16
                            62.672,384.775,16,16
                            68.717,328.786,16,16
                            371.328,143.587,16,16
                            216.170,263.576,16.16
                            125.772,61.709,16,16
                            310.043,250.966,16,16
                            293.848,142.785,16,16
                            223.535,222.867,16,16
        


(Tiling Specification - after defining a region of interest (ROI) you can then direct the program to
cut the ROI into tiles - either by the size of the tile or the number of tiles.)


-tile:RXY:<FILENAME>:<ROI-LLX>,<ROI-LLY>,<ROI-URX>,<ROI-URY>:<NX>,<NY>[:<I>,<J>]*
 
                           RXY - indicates Region of Interest defined by LL and UR coordinates
                           user defined number of tiles along X and Y 
                           it is also possible to define which tiles in the array are generated by  
                           using the optional I,J parameters (indexes into the tile array.)

                           Filename = OUTPUT_DIR + FILENAME + I.J + EXTENSION


-tile:RWH:<FILENAME>:<ROI-LLX>,<ROI-LLY>,<ROI-URX>,<ROI-URY>:<WIDTH>,<HEIGHT>[:<I>,<J>]*
 
                           RXY - indicates Region of Interest defined by LL and UR coordinates
                           user defined width and height of tile 
                           it is also possible to define which tiles in the array are generated by  
                           using the optional I,J parameters (indexes into the tile array.)

                           Filename = OUTPUT_DIR + FILENAME + I.J + EXTENSION


-tile:CWH:<FILENAME>:<WIDTH>,<HEIGHT>,<CX>,<CY[:<CX>,<CY>]*
 
                           CWH - Generate WIDTH x HEIGHT sized tiles centered on one or more 
                           coordinates multiple centers may be specified.

                           Filename = OUTPUT_DIR + FILENAME + COUNTER + EXTENSION
    
------------------------

Format - clipextract supports both polygonal (vector) formats and bitmap (image) formats. Choose 
one of the following format options:


+format:IMAGE              Do not write bitmap to disk. (what is the purposes, Viraj?)
+format:TIFF               Write clips to disk as monochrome TIFF using packbits compression       
+format:BMP                Write clips to disk as monochrome BMP (uncompressed)
+format:RAW                Write clips to disk as Artwork's RAW format


+format:POLYS              Do not write the vector data to disk
+format:GDSII              write each clip as a GDSII file (flat hierarchy, layers preserved)
+format:OASIS              write each clip as an OASIS file (flat hierarchy, minimal compression)

------------------------

Format Options - if you have selected an bitmap (image) format then here you control the DPI, 
polarity and can apply dithering.

-pixelsize:<SIZE-X>[,<SIZE-Y>]    Specify the size of a pixel (in file units) along X or X,Y
                                  If the second value is omitted, the X-value is used to draw a 
                                  square pixel. Default = 1 um square pixel.

-dither:<0.0-TO-1.0>              Specify a value for ordered dithering using a 8x8 Bayer matrix.
                                  The number of pixels drawn in a 8x8 pixel block for solid fill
                                  areas decreases as the dither value changes from 1.0 (all pixels) 
                                  to 0.0 (no pixels) By default, all pixels are drawn (1.0)

-invert                           Invert the image polarity by drawing white pixels (data) on a black 
                                  background. Default is to draw black pixels on a white background.

-right-to-left                    Reverse the direction of rasterization along a single row of
                                  pixels. The rightmost pixel on a given row corresponds to the
                                  min-x position in the data space. By default, the rightmost pixel 
                                  on a given row corresponds to the max-x position in the data space.
                        

If you have specified a vector clip format then the following format controls are avaiable:

-union                            Unionize the polygon vectors such that polygons containing holes
                                  are split into butting polygons.


-clip                             Polygons crossing the window are clipped at the window edges and 
                                  polygons with holes are split into butting polygons „h By default,
                                  any polygon crossing the window is extracted as-is

                                  From a clip/second point of view using neither of these options is
                                  generally fastest, followed by -clip and finally -union.

-maxvert:<MAX-VERT-PER-POLYGON>   Specify the maximum number of vertices per output polygon
                                  (only if -clip, -union or -lsynth are used)

                                  Polygons with vertices more than the specified limit will be 
                                  split into smaller adjoining polygons

                                  Default max: 8190 vertices

-butting:<OVERLAP>                If specified, polygons with holes are split into butting polygons. 
                                  The overlap value if > 0.0 determines the amount of overlap in file 
                                  units between those polygons along the butting edges.

                                 By default, polygons with holes are outputted with cutlines joining the 
                                 hole boundaries to the outer boundary.

-lsynth:<LAYER-SYNTH-SPEC>       Create new layers (polygons) by performing Boolean operations on 
                                 two or more layers (polygons)


                                 The syntax for the LAYER-SYNTH-SPEC is as follows:
                                 <layersynth-spec> := <target>[;<target>]* (One or more targets)
                                 <target> := <target-layer>:<target-dttp>=<op-layer>[:<op-dttp>][<op><op-layer>
                                 [:<op-dttp<]]* 
                                 (Generate a layer:dttp from operations on one or more layers or layer:dttps)
                                 <op< := '+' (union) 
                                            or '-' (difference) 
                                            or '&' (intersection) 
                                            or '^' (xor) 
                                            or ',' (aggregation/OR-without-union) 
                                            or '|' (aggregation/OR-without-union)

                                 The output clips do not have any hierarchy
                                 -union option is ignored in this mode

------------------------


Miscellaneous Options - these control thread usage, logging and messaging. They are all optional and 
can be used in any combination.

-thrnum:<N-EXPLODER-THREADS>,<N-PROCESSOR-THREADS>
    
                                  Specify the number of threads to be used for collecting 
                                  polygons (exploder) and processing them (processor).
                                  The number of exploder threads determines the number of windows 
                                  being extracted at the same time.
                                  The number of processor threads determined how much parallelism is
                                  applied into generating the output for each window (computing union).
                                  The rasterization is always single threaded since each polygon is
                                  rasterized as soon as it is retrieved from the database (on-the-fly)
                                  By default, the configuration used is 2,(number of physical cores)/2
                                  for extracting polygons and (number of physical cores),1 for 
                                  extracting images.


-log:<NEW-LOG-FILE>              Generate an execution log (text file)  
or                               or 
-log+:<EXISTING-LOG-FILE>        append to an existing text file
                       

-silent                          Do not send progress updates to stdout/stderr. Doing some might result 
                                 in slight improvement in execution time. By default, clipextract prints 
                                 messages and progress updates to stdout/stderr.







ARTWORK CONVERSION SOFTWARE, INC.                  Company Profile
417 Ingalls St.,     Santa Cruz, CA 95060         Tel (831) 426-6163     Fax 426-2824               email: info@artwork.com