[Artwork] / [QisMLib] / [Programmer's Corner]
Refer to QisMScript Commands page for syntax details
Sample Scripts (using QisMScript)QisMFilePrint scan information from a CAD fileCreate DBLOAD cache (disk image) from a GDSII fileQisMExploderExplode polygons (boundaries) from a view of a CAD file - write as OASISExplode polygons (boundaries) from a view of a CAD file - write as TIFF imageExplode TEXTs from a view of a CAD fileExplode references from a view of a CAD fileQisMBoolUnionize polygons from a view of a CAD filePerform binary operation between polygons of two layers from a CAD fileQisMDrawRender a view of a CAD file to a GIF imageQisMLayerSynthSynthesize a layer from an expression of boolean operations between layers of a CAD fileQisMClipExtractExtract clips of polygons from various windows of a CAD fileExtract clips of raster bitmaps from various windows of a CAD fileQisMRasterGenerate high resolution raster bitmaps from a set of windows of a CAD fileQisMRTCR (Windows)Generate high resolution raster bitmaps with corrections and annotationsQisMCorrXApply multi-point corrections to a view of a CAD fileGenerate a raster image from a corrected view of a CAD fileQisMHExtractExtract data with hierarchy from a CAD fileCombine three CAD files into oneQisMGerber (Windows)Create a GDSII file from Gerber inputUse QisMClipExtract (images) with Gerber input
xxxxxxxxxx## fileinfo.script: print scan information from a file## required license: 11003 (QisMLib)# Ensure that the input file is specifiedscript.required INPUT# Create database from a GDSII/OASIS/DBLOAD filelib.load_file &filedb=F1 "input=((INPUT))"# Print names of all cells with extentsfile.print_cells $filedb=F1 extents# Print hierarchy tree for each top cellfile.print_cell_tree $filedb=F1# Print list of layer:datatype(s)file.print_layers $filedb=F1# Destroy databaselib.unload_file $filedb=F1xxxxxxxxxx## execute fileinfo.script on the command-lineqismscript64.exe +script:fileinfo.script -log:fileinfo.log INPUT=${gds_oas_dbload_file_path}xxxxxxxxxx## dbload.script: create dbload cache from a gdsii database## required license: 11003 (QisMLib)# Ensure user input is presentscript.required GDSII# Create database from a GDSII filelib.load_file &filedb=F1 "input=((GDSII))" "layermap=((LAYERMAP))" ((NOTEXT))# Save database to DBLOADfile.save_memory_maps $filedb=F1# Cleanuplib.unload_file $filedb=F1xxxxxxxxxx## execute dbload.script on the command-lineqismscript64.exe +script:dbload.script -log:dbload.log GDSII=${gds_file_path} [LAYERMAP=${layer_mapping_scheme}] [NOTEXT=notext]xxxxxxxxxx## explode_to_oas.script : write geometries from a view of a database to an oasis file## required license: 11003 (QisMLib) 11027 (QisMExploder)# Ensure that the input file, window and output path are specifiedscript.required INPUT WINDOW OUTBASE# Create database from a GDSII/OASIS/DBLOAD filelib.load_file &filedb=F1 "input=((INPUT))"# Create exploder objectfile.create_exploder $filedb=F1 &exploder=E1# Set a view to explode (default cell, all layers, all nesting levels)exploder.set_view $exploder=E1 "window=((WINDOW))"# Collect polygons (boundaries and paths) crossing that viewexploder.get_boundaries $exploder=E1 &bin=B1# Write polygons to an OASIS file with nm resolutionstore.write_as_polys $bin=B1 "path=((OUTBASE))" grid=1e-9 units=1e-6 format=OAS# Destroy collected polygonsexploder.delete_store $bin=B1# Destroy exploder objectfile.destroy_exploder $filedb=F1 $exploder=E1# Destroy databaselib.unload_file $filedb=F1xxxxxxxxxx## execute explode_to_oas.script on the command-lineqismscript64.exe +script:explode_to_oas.script -log:explode_to_oas.log INPUT=${gds_oas_dbload_file_path} WINDOW=${minx},${miny},${maxx},${maxy} OUTBASE=${output_oas_dir_and_filename}xxxxxxxxxx## explode_to_tif.script: write geometries from a view of a database to an tiff image## required license: 11003 (QisMLib) 11027 (QisMExploder) 14827 (QisMRaster)## required extension: QisMRaster# Ensure user input is presentscript.required INPUT LAYER WINDOW OUTBASE DPI# Create database from a GDSII/OASIS/DBLOAD filelib.load_file &filedb=F1 "input=((INPUT))"# Create exploder objectfile.create_exploder $filedb=F1 &exploder=E1# Set a view to explode (default cell, all nesting levels)exploder.set_view $exploder=E1 "window=((WINDOW))" "layers_on=((LAYER))"# Collect polygons (boundaries and paths) crossing that viewexploder.get_boundaries $exploder=E1 &bin=B1# Write polygons to a TIF file with 0.5um resolutionstore.write_as_image $bin=B1 "path=((OUTBASE))" grid=1e-9 units=1e-6 format=TIF resolution=DPI,((DPI))# Destroy collected polygonsexploder.delete_store $bin=B1# Destroy exploder objectfile.destroy_exploder $filedb=F1 $exploder=E1# Destroy databaselib.unload_file $filedb=F1xxxxxxxxxx## execute explode_to_tif.script on the command-lineqismscript64.exe +script:explode_to_tif.script -log:explode_to_tif.log INPUT=${gds_oas_dbload_file_path} LAYER=${layers_string} WINDOW=${minx},${miny},${maxx},${maxy} OUTBASE=${output_tif_dir_and_filename} DPI=${dots_per_inch}xxxxxxxxxx## explode_texts.script: write TEXTs from a view of a database to a text file## required license: 11003 (QisMLib) 11027 (QisMExploder)# Ensure user input is presentscript.required INPUT OUTPUT# Create database from a GDSII/OASIS/DBLOAD filelib.load_file &filedb=F1 "input=((INPUT))"# Create exploder objectfile.create_exploder $filedb=F1 &exploder=E1# Collect texts and write to file (with sorting)exploder.write_texts_to_file $exploder=E1 "file=((OUTPUT))" sort# Destroy exploder objectfile.destroy_exploder $filedb=F1 $exploder=E1# Destroy databaselib.unload_file $filedb=F1xxxxxxxxxx## execute explode_texts.script on the command-lineqismscript64.exe +script:explode_texts.script -log:explode_texts.log INPUT=${gds_oas_dbload_file_path} OUTPUT=${output_txt_file_path}xxxxxxxxxx## explode_refs.script : write cell references from a view of a database to a text file## required license: 11003 (QisMLib) 11027 (QisMExploder)# Ensure user input is presentscript.required INPUT OUTBASE WINDOW# Create database from a GDSII/OASIS/DBLOAD filelib.load_file &filedb=F1 "input=((INPUT))"# Create exploder objectfile.create_exploder $filedb=F1 &exploder=E1# Set a view to explode (default cell, all layers, all nesting levels)exploder.set_view $exploder=E1 "window=((WINDOW))"# Collect srefs and write to file (with sorting)exploder.write_srefs_to_file $exploder=E1 "file=((OUTBASE)).srefs" sort# Collect arefs and write to file (with sorting)exploder.write_arefs_to_file $exploder=E1 "file=((OUTBASE)).arefs" sort# Destroy exploder objectfile.destroy_exploder $filedb=F1 $exploder=E1# Destroy databaselib.unload_file $filedb=F1xxxxxxxxxx## execute explode_refs.script on the command-lineqismscript64.exe +script:explode_refs.script -log:explode_refs.log INPUT=${gds_oas_dbload_file_path} OUTBASE=${output_srefs_arefs_dir_and_filename} WINDOW=${minx},${miny},${maxx},${maxy}xxxxxxxxxx## unary.script: perform boolean operation on polygons from a window ## required license: 11003 (QisMLib), 11047 (QisMBool)## set some default parametersscript.setif FORMAT=GDS WLAYER=500:500 OLAYER=100:0 OUTPUT=out.sf## ensure that the required parameters have been specifiedscript.required INPUT WINDOW LAYERS OUTPUT## load the input GDSII/OASIS/DBLOAD filelib.load_file &filedb=F input=((INPUT))## create an output GDSII filecadwriter.open &writer=W grid_m=((F.grid)) units_m=((F.units)) path=((OUTPUT)) format=((FORMAT))cadwriter.begin_cell $writer=W name=TOP## write the extents of the window of interest to the output filecadwriter.box $writer=W box=((WINDOW)) layer=((WLAYER))## create a boolean objectbool.create_instance &bool=B## create and setup a boolean settings objectbool.create_settings &settings=S boolsettings.set $settings=S grid=((F.grid)) units=((F.units)) clip=((WINDOW)) sliver=((SLIVER)) butting=((OVERLAP)) maxvert=((MAXV)) passthru=((PASS)) mergestripes=((MERGE)) convex=((CONVEX)) sizing=((SIZING)) rndcorners=((RNDCORNERS)) ## get polygons crossing the specified viewfile.create_exploder &exploder=E $filedb=Fexploder.set_view $exploder=E layers_on=((LAYERS)) window=((WINDOW))exploder.get_boundaries $exploder=E &bin=B1## write source polygons to the output file as-iscadwriter.bstore $writer=W $bin=B1## perform boolean operation on the source polygonsboolinst.union $bool=B $in=B1 &out=Bu $settings=S layer=((OLAYER)) ## write resulting polygons to the output filecadwriter.bstore $writer=W $bin=Bu## cleanupboolinst.delete_store $bin=Buexploder.delete_store $bin=B1file.destroy_exploder $exploder=E $filedb=Fbool.destroy_settings $settings=Sbool.destroy_instance $bool=Bcadwriter.end_cell $writer=Wcadwriter.close $writer=Wlib.unload_file $filedb=Fscript.print_varsxxxxxxxxxx## execute unary.script on the command-lineqismscript64.exe +script:unary.script -log:unary.log INPUT=${gds_oas_dbload_file_path} WINDOW=${minx},${miny},${maxx},${maxy} LAYERS=${layers_to_unionize} OUTPUT=${output_gds_oas_dir_and_filename} [FORMAT=GDS | FORMAT=OAS] [SLIVER=${sliver_threshold}] [OVERLAP=${overlap_between_butting_polygons}] [MAXV=${max_vertices_per_output_polygon}] [PASS=ON | PASS=OFF] [MERGE=ON | MERGE=OFF] [CONVEX=OFF | CONVEX=FULL | CONVEX=HTRAP | CONVEX=VTRAP] [SIZING=OFF | SIZING=STD | SIZING=ISOTR,${value} | SIZING=NONISOTR,{x_value},{y_value}] [RNDCORNERS=RTANGLE | RNDCORNERS=THREEPT | RNDCORNERS=FIVEPT]xxxxxxxxxx## binary.script: perform boolean operation between polygons from two layers for a window## required license: 11003 (QisMLib), 11047 (QisMBool)## set some default parametersscript.setif FORMAT=GDS WLAYER=500:500 OLAYER=100:0 OUTPUT=out.sf## ensure that the required parameters have been specifiedscript.required INPUT WINDOW L1 L2 OP OUTPUT## load the input GDSII/OASIS/DBLOAD filelib.load_file &filedb=F input=((INPUT))## create an output GDSII filecadwriter.open &writer=W grid_m=((F.grid)) units_m=((F.units)) path=((OUTPUT)) format=((FORMAT))cadwriter.begin_cell $writer=W name=TOP## write the extents of the window of interest to the output filecadwriter.box $writer=W box=((WINDOW)) layer=((WLAYER))## create a boolean objectbool.create_instance &bool=B## create and setup a boolean settings objectbool.create_settings &settings=S boolsettings.set $settings=S grid=((F.grid)) units=((F.units)) clip=((WINDOW)) sliver=((SLIVER)) butting=((OVERLAP)) maxvert=((MAXV)) passthru=((PASS)) mergestripes=((MERGE)) convex=((CONVEX)) sizing=((SIZING)) rndcorners=((RNDCORNERS)) ## get polygons crossing the specified view for operands A & Bfile.create_exploder &exploder=E $filedb=Fexploder.set_view $exploder=E layers_on=((L1)) window=((WINDOW))exploder.get_boundaries $exploder=E &bin=B1exploder.set_view $exploder=E layers_on=((L2)) window=((WINDOW))exploder.get_boundaries $exploder=E &bin=B2## write source polygons to the output file as-iscadwriter.bstore $writer=W $bin=B1cadwriter.bstore $writer=W $bin=B2## perform boolean operation on the source polygonsboolinst.binary $bool=B $bin_a=B1 $bin_b=B2 &out=Bu $settings=S layer=((OLAYER)) op=((OP))## write resulting polygons to the output filecadwriter.bstore $writer=W $bin=Bu## cleanupboolinst.delete_store $bin=Buexploder.delete_store $bin=B1exploder.delete_store $bin=B2file.destroy_exploder $exploder=E $filedb=Fbool.destroy_settings $settings=Sbool.destroy_instance $bool=Bcadwriter.end_cell $writer=Wcadwriter.close $writer=Wlib.unload_file $filedb=Fscript.print_varsxxxxxxxxxx## execute binary.script on the command-lineqismscript64.exe +script:binary.script -log:binary.log INPUT=${gds_oas_dbload_file_path} WINDOW=${minx},${miny},${maxx},${maxy} L1=${layer1}[:{datatype1}] L2=${layer2}[:${datatype2}] OP=UNION | OP=DIFFERENCE | OP=INTERSECTION | OP=XOR [FORMAT=GDS | FORMAT=OAS] [SLIVER=${sliver_threshold}] [OVERLAP=${overlap_between_butting_polygons}] [MAXV=${max_vertices_per_output_polygon}] [PASS=ON | PASS=OFF] [MERGE=ON | MERGE=OFF] [CONVEX=OFF | CONVEX=FULL | CONVEX=HTRAP | CONVEX=VTRAP] [SIZING=OFF | SIZING=STD | SIZING=ISOTR,${value} | SIZING=NONISOTR,{x_value},{y_value}] [RNDCORNERS=RTANGLE | RNDCORNERS=THREEPT | RNDCORNERS=FIVEPT]xxxxxxxxxx## draw.script : render a view of the database to a gif image## requires license : 11003 (QisMLib)## ensure the user arguments have been specifiedscript.required INPUT BASE## create a database from a gdsii/oasis filelib.load_file &filedb=F "input=((INPUT))"## create a gif image from a view of the databasedraw.image $filedb=F "path=((BASE))" cell=((CELLNAME)) layers=((LAYERS)) window=((WINDOW)) nesting=((NL)) filtersize=((DFS)) res=((RES)) text=((TEXT)) background=((BCKG)) fill=((FILL)) refboxes=((REFS))## destroy the databaselib.unload_file $filedb=Fxxxxxxxxxx## execute draw.script on the command-lineqismscript64.exe +script:draw.script -log:draw.log INPUT=${gds_oas_dbload_file_path} BASE=${output_gif_dir_and_filename} [CELLNAME={view_cell}] [LAYERS={layers_string}] [WINDOW=${minx},${miny},${maxx},${maxy}] [NL=${nesting_level}] [DFS=${display_filter_size}] [RES=${x_pixels},{y_pixels}] [TEXT=ON | TEXT=OFF] [BCKG=BLACK | BCKG=WHITE] [FILL=ON | FILL=OFF] [REFS=ON | REFS=OFF | REFS=NL]xxxxxxxxxx## lsynth.script: synthesize a layer using an expression (e.g Lout = L1 - L2) of layers and boolean operators from a view of a database## required license: 11003 (QisMLib) 11069 (QisMLayerSynth)## required extension: QisMLayerSynth# Ensure user input is presentscript.required INPUT WINDOW LY1 LY2 LOUT# Create database from a GDSII/OASIS/DBLOAD filelib.load_file &filedb=F1 "input=((INPUT))"# Create synthesizer objectlsynth.new_synthesizer &lsynth=L1 $filedb=F1# Perform layer synthesis (LOUT = LY1 - LY2)lsynth.synthesize_layers $lsynth=L1 &bin=B1 "spec=@ ((LY1)) ((LY2)) - ((LOUT)) ~" clip "window=((WINDOW))"# Write output layer to a GDSII filestore.write_as_polys $bin=B1 path=./lsynth grid=1e-9 units=1e-6 format=GDS# Cleanuplsynth.delete_store $bin=B1lsynth.delete_synthesizer $lsynth=L1lib.unload_file $filedb=F1xxxxxxxxxx## execute lsynth.script on the command-lineqismscript64.exe +script:lsynth.script -log:lsynth.log INPUT=${gds_oas_dbload_file_path} WINDOW=${minx},${miny},${maxx},${maxy} LY1=${layer1}[:{datatype1}] LY2=${layer2}[:{datatype2}] LOUT=${output_layer}:${output_datatype}xxxxxxxxxx## clipx.script : extract clips (windows) of a database as gdsii files## required license: 11003 (QisMLib), 4 x 31209 (QisMClipExtract)## required extension: QisMClipExtract## ensure required user inputs have been specifiedscript.required INPUT WIDTH HEIGHT DIRNAME## make output directorysystem mkdir "((DIRNAME))"## create database from a GDSII/OASIS designlib.load_file &filedb=F "input=((INPUT))"## create a set of 20 random windows of the specified WIDTH x HEIGHTfile.get_cell_extents $filedb=F &var=HOMEscript.new_window_set &set=W "rand=((DIRNAME))/clips:((HOME)):((WIDTH)),((HEIGHT)):20"## extract clips of polygons as OASIS filesclip.extract_polygons $filedb=F $windows=W clip format=OAS per_layer_union thrnum=4,1## cleanup before exitscript.delete_window_set $set=Wlib.unload_file $filedb=Fxxxxxxxxxx## execute clipx.script on the command-lineqismscript64.exe +script:clipx.script -log:clipx.log INPUT=${gds_oas_dbload_file_path} WIDTH=${clip_width_fileunits} HEIGHT=${clip_height_fileunits} DIRNAME=${output_dir}xxxxxxxxxx## clipx_img.script : extract clips (windows) of a database as image files## required license: 11003 (QisMLib), 4 x 31209 (QisMClipExtract)## required extension: QisMClipExtract## ensure required user inputs have been specifiedscript.required INPUT WIDTH HEIGHT DIRNAME LAYERS DPI## make output directorysystem mkdir "((DIRNAME))"## create database from a GDSII/OASIS designlib.load_file &filedb=F "input=((INPUT))"## create a set of 20 random windows of the specified WIDTH x HEIGHTfile.get_cell_extents $filedb=F &var=HOMEscript.new_window_set &set=W "rand=((DIRNAME))/clips:((HOME)):((WIDTH)),((HEIGHT)):20"## extract clips of polygons as TIFF filesclip.extract_images $filedb=F $windows=W resolution=DPI,((DPI)) layers=((LAYERS)) format=TIF## cleanup before exitscript.delete_window_set $set=Wlib.unload_file $filedb=Fxxxxxxxxxx## execute clipx_img.script on the command-lineqismscript64.exe +script:clipx_img.script -log:clipx_img.log INPUT=${gds_oas_dbload_file_path} DIRNAME=${output_dir} WIDTH=${clip_width_fileunits} HEIGHT=${clip_height_fileunits} DPI=${dots_per_inch} LAYERS=${layers_string}xxxxxxxxxx## qismrip.script: generate high-res raster bitmaps for a set of windows from a database## required license: 11003 (QisMLib), 14827 (QisMRaster)## required extension: QisMRaster## ensure required user inputs have been specifiedscript.required INPUT OUTBASE NXY PXSIZE## create a db from a filelib.load_file &filedb=FDB "input=((INPUT))" layermap=((LAYERMAP)) notext ## create a set of nx*ny equal sized tiles from the home view file.get_cell_extents $filedb=FDB &var=HOMEscript.new_window_set &set=WNDS "tilerc=((OUTBASE)):((HOME)):((NXY))"## create rasterization parametersraster.create_params ¶ms=ROPTS pixelsize=((PXSIZE)) ((INVERT)) ((DITHER)) ((R2L)) ((B2T)) thrnum=((NTHREADS)) format=TIF## create rasterizerraster.create_rasterizer &rstr=RSTR $filedb=FDB## rasterize windowsraster.window $rstr=RSTR $windows=WNDS $params=ROPTS cell=((CELL)) layers=((LAYERS))## cleanup before exitraster.destroy_rasterizer $rstr=RSTRraster.destroy_params $params=ROPTS script.delete_window_set $set=WNDSlib.unload_file $filedb=FDBscript.print_varsxxxxxxxxxx## execute qismrip.script from the command-lineqismscript64.exe +script:qismrip.script -log:qismrip.log INPUT=${gds_oas_dbload_file_path} OUTBASE=${output_dir_and_filename} NXY=${n_tiles_x},${n_tiles_y} PXSIZE=${size_x}[,${size_y}] [NTHREADS={n_threads_per_image}] [LAYERS=${layers_string}]x
## rtcr.script## requires license: 11003 (QisMLib) 1303 (QisMRTCR) 14827 (QisMRaster)## requires extension: QisMRTCR QisMRaster## Create job directorysystem rd /s /q JOB1system md JOB1## Create corrections object if the corrections file is specifiedscript.if CORRFILE rtcr.create_corrections &corr=CORR1 "file=((CORRFILE))"## Create annotations object if the annotations file is specifiedscript.if ANNFILE rtcr.create_annotations &ann=ANN1 "file=((ANNFILE))"## Setup jobaskif key=INPUT "msg=Specify the semi-flat GDSII input created by SFGen"rtcr.setup_job &job=JOB1 outdir=JOB1 "input=((INPUT))" $ann=ANN1 $corr=CORR1## Create a set of 6x6 tiles from the home viewfile.get_cell_extents $filedb=JOB1 &var=HOMEscript.new_window_set &set=WNDS1 "tilerc=tile:((HOME)):6,6"## Create rasterizeraskif key=PXSIZE "msg=Specify the size of each pixel {x}[,{y}]"rtcrjob.create_rasterizer $job=JOB1 &rstr=RSTR1 pixelsize=((PXSIZE)) ## Get raster images for the specified tiles as TIFF filesrtcrjob.get_raster_image $job=JOB1 $rstr=RSTR1 $windows=WNDS1 format=TIF## Cleanupscript.delete_window_set $set=WNDS1rtcrjob.destroy_rasterizer $job=JOB1 $rstr=RSTR1rtcr.end_job $job=JOB1rtcr.destroy_corrections $corr=CORR1rtcr.destroy_annotations $ann=ANN1xxxxxxxxxx## execute rtcr.scriptqismscript64.exe +script:rtcr.script -log:rtcr.log INPUT=${sfgen_semiflat_gdsii_output_path} PXSIZE=${sizeof_pixel_x}[,{sizeof_pixel_y}] [CORRFILE=${corrections_txt_file_path}] [ANNFILE=${annotations_txt_file_path}]xxxxxxxxxx## corrx.script : apply corrections to a view of the database## requires license : 11003 (QisMLib) 11093 (QisMCorrX)## requires extension : QisMCorrX## set default optionsscript.setif NT=0 SOURCE=100## ensure required arguments have been specifiedscript.required INPUT CORRECTIONS WINDOW BASE## create database from a gdsii/oasis filelib.load_file &filedb=F input=((INPUT))## create correction optionscorrx.create_opts &opts=O thrnum=((NT)) source=((SOURCE))## create correction objectcorrx.create_corrx_obj &corrx=C $filedb=F corrections=((CORRECTIONS)) cell=((CELL))## generate corrected geometries from a view of the databasecorrxobj.correct_view $corrx=C window=((WINDOW)) &bin=B $opts=O layers=((LAYERS))## write corrected geometries to a gdsii filestore.write_as_polys $bin=B path=((BASE)) grid=((F.grid)) units=((F.units)) format=GDS## cleanupcorrx.destroy_corrx_obj $corrx=Ccorrxobj.delete_store $bin=Bcorrx.destroy_opts $opts=Olib.unload_file $filedb=F script.print_varsxxxxxxxxxx## execute corrx.script on the command-lineqismscript64.exe +script:corrx.script -log:corrx.log INPUT=${gds_oas_dbload_file_path} WINDOW=${minx},${miny},${maxx},${maxy} BASE=${output_gds_dir_and_filename} CORRECTIONS=${x},${y},${dx},${dy}[,${x},${y},${dx},${dy}]* [LAYERS=${layers_string}]xxxxxxxxxx## corrx_raster.script : apply corrections (as simple rotation) to a view of the database and generate raster image## requires license : 11003 (QisMLib) 11093 (QisMCorrX) 14827 (QisMRaster)## requires extension : QisMCorrX QisMRaster## set default optionsscript.setif NT=0 ANGLE=20 FORMAT=TIF## ensure required arguments have been specifiedscript.required INPUT WINDOW PXS## create database from a gdsii/oasis filelib.load_file &filedb=F input=((INPUT))## create correction optionscorrx.create_opts &opts=O thrnum=((NT)) ## compute correction points from a standard rotationcorrx.rotate_view $filedb=F angle=((ANGLE)) cell=((CELL)) &var=CORRECTIONS## create rasterization parametersraster.create_params ¶ms=P pixelsize=((PXS)) ((INVERT)) dither=((DITHER)) ((R2L)) ((B2T)) thrnum=((NT)) format=((FORMAT))## create rasterizer objectraster.create_rasterizer &rstr=R $filedb=F## create corrections objectcorrx.create_corrx_obj &corrx=C $filedb=F corrections=((CORRECTIONS)) cell=((CELL))## generate raster image for a windowcorrxobj.rasterize_window $corrx=C $rstr=R $params=P window=((WINDOW)) layers=((LAYERS))## cleanupcorrx.destroy_corrx_obj $corrx=Craster.destroy_rasterizer $rstr=Rraster.destroy_params $params=Pcorrx.destroy_opts $opts=Olib.unload_file $filedb=F script.print_varsxxxxxxxxxx## execute corrx_raster.script on the command-lineqismscript64.exe +script:corrx_raster.script -log:corrx_raster.log INPUT=${gds_oas_dbload_file_path} ANGLE=${correction_angle_degrees} PXS=${size_of_pixel_x}[,${size_of_pixel_y}] LAYERS=${layers_string} WINDOW=${minx},${miny},${maxx},${maxy}xxxxxxxxxx## hextract.script: extract hierarchical data from a view of the file## required license: 11003 (QisMLib), 11083 (QisMHExtract)## required extension: QisMHExtract## load the source fileaskif key=INPUT "msg=Specify path of the input file"lib.load_file &filedb=F input=((INPUT))## create the extractor objecthextract.create_extractor &extractor=H $filedb=F## create a circular clipping regionhextract.create_regions ®ions=R ((COMPLEMENT))askif key=CIRC "msg=Specify circle as {cx},{cy},{radius},{arcres},{arcsag}"hextractregions.add $regions=R circle=((CIRC)) ## create a settings objecthextract.create_opts &opts=O ((FLATTEN)) ((TEXT)) ((NOPATHS)) sliver=((SLIVER)) top=((TOPNAME)) prename=((PRE)) postname=((POST)) layeroffx=((LOFFX)) clip=((CLIP)) txy=((TXY)) scale=((SCALE)) angle=((ANGLE)) onlyrefs=((ONLYREFS)) droprefs=((DROPREFS))## create extracted outputaskif key=OUT "msg=Specify base path of the output file"hextractor.extract_to_file $extractor=H out=((OUT)) units=((F.grid)),((F.units)) format=((FORMAT)) cell=((CELL)) layers=((LAYERS)) $opts=O $regions=R## cleanuphextract.destroy_opts $opts=Ohextract.destroy_regions $regions=Rhextract.destroy_extractor $extractor=Hlib.unload_file $filedb=Fscript.print_varsxxxxxxxxxx## execute hextract.script on the command-lineqismscript64.exe +script:hextract.script -log:hextract.log INPUT=${gds_oas_dbload_file_path} CIRC=${center_x},${center_y},${radius},${arcres},${arcsag} [COMPLEMENT=complement] [TEXT=text] [NOPATHS=nopaths] [PRE=${output_cellnames_prefix}] [POST=${output_cellnames_suffix}] [TOPNAME=${output_top_cell_name}]xxxxxxxxxx## merge_three_files.script : merge three files into one using QisMHExtract## required license: 11003 (QisMLib), 11083 (QisMHExtract)## required extension: QisMHExtractscript.setif GRID=1e-9 UNITS=1e-6## open a writer for the merged fileaskif key=OUT "msg=Specify the path of the merged file"cadwriter.open &writer=W grid_m=((GRID)) units_m=((UNITS)) path=((OUT)) format=((FORMAT))## extract contents of the first file to the writeraskif key=FILE1 "msg=Specify the path of the first file"lib.load_file &filedb=F input=((FILE1))hextract.create_extractor &extractor=H $filedb=Fhextract.create_opts &opts=O postname=_1 top=FILE_1hextractor.extract_to_writer $extractor=H $writer=W $opts=O hextract.destroy_opts $opts=Ohextract.destroy_extractor $extractor=Hlib.unload_file $filedb=F## extract contents of the second file to the writeraskif key=FILE2 "msg=Specify the path of the second file"lib.load_file &filedb=F input=((FILE2))hextract.create_extractor &extractor=H $filedb=Fhextract.create_opts &opts=O postname=_2 top=FILE_2hextractor.extract_to_writer $extractor=H $writer=W $opts=O hextract.destroy_opts $opts=Ohextract.destroy_extractor $extractor=Hlib.unload_file $filedb=F## extract contents of the third file to the writeraskif key=FILE3 "msg=Specify the path of the third file"lib.load_file &filedb=F input=((FILE3))hextract.create_extractor &extractor=H $filedb=Fhextract.create_opts &opts=O postname=_3 top=FILE_3hextractor.extract_to_writer $extractor=H $writer=W $opts=O hextract.destroy_opts $opts=Ohextract.destroy_extractor $extractor=Hlib.unload_file $filedb=F## combine the top cells of each file into a single new cellcadwriter.begin_cell $writer=W name=MERGEcadwriter.reference $writer=W name=FILE_1 pos=0,0cadwriter.reference $writer=W name=FILE_2 pos=0,0cadwriter.reference $writer=W name=FILE_3 pos=0,0cadwriter.end_cell $writer=W## close the merged filecadwriter.close $writer=Wscript.print_varsxxxxxxxxxx## execute merge_three_files.script on the command-lineqismscript64.exe +script:merge_three_files.script -log:merge_three_files.log OUT=${output_gds_oas_file_path} FORMAT=GDS | FORMAT=OAS FILE1=${first_gds_oas_dbload_file_path} FILE2=${second_gds_oas_dbload_file_path} FILE3=${third_gds_oas_dbload_file_path}xxxxxxxxxx## gerber_to_gds.script: create a gdsii file from gerber (rs274x)## requires license: 11003 (QisMLib) 2756 (QisMGerber)## requires extension: QisMGerber## ensure required user inputs have been specifiedscript.required GERBER GDSOUT## create a database from a gerber (rs274x) filegerber.load &filedb=F path=((GERBER)) workdir=((WORKDIR)) arcres=((ARCRES)) arcsag=((ARCSAG)) butting=((BUTTING)) thrnum=((THRNUM)) ((DBG)) newunits=((GDSUNITS))## observe the variables avaiable in the system so farscript.print_vars## use the QisMFile handle from the database to do something (print a report)## the QisMFile handle shares the same name as the database ('F')file.print_report $filedb=F## create a gdsii file from the databasegerberfile.save_gds $filedb=F path=((GDSOUT))## destroy the database gerber.unload $filedb=F## observe the variables avaiable in the system script.print_varsxxxxxxxxxx## execute gerber_to_gds.script on the command-lineqismscript64.exe +script:gerber_to_gds.script -log:gerber_to_gds.log GERBER=${rs274x_file_path} GDSOUT=${output_gds_path} [WORKDIR=${working_dir}] [GDSUNITS=INCH | GDSUNITS=MIL | GDSUNITS=CM | GDSUNITS=MM | GDSUNITS=UM] [ARCRES=${arc_resolution}] [ARCSAG=${chord_error}[,INCH | MIL | CM | MM | UM]] [BUTTING=${overlap_value}[,INCH | MIL | CM | MM | UM]] [THRNUM=${n_threads}]xxxxxxxxxx## clipx_gerber.script: extract clips (windows) of a gerber database as raster bitmaps## requires license: 11003 (QisMLib) 2756 (QisMGerber) 4 x 31209 (QisMClipExtract)## requires extension: QisMClipExtract, QisMGerber## ensure required user inputs have been specifiedscript.required GERBER DPI## create a database from a gerber (rs274x) filegerber.load &filedb=F path=((GERBER)) workdir=((WORKDIR)) arcres=((ARCRES)) arcsag=((ARCSAG)) butting=((BUTTING)) thrnum=((THRNUM)) ((DBG)) newunits=UM## record the extents of the home view (in the variable called 'HOME')file.get_cell_extents $filedb=F &var=HOME## create a set of randomly selected 16 10000x10000 um windows from the home viewscript.new_window_set &set=W rand=clip:((HOME)):10000,10000:16## generate raster bitmaps for the specified windows using QisMClipExtractclip.extract_images $filedb=F $windows=W resolution=DPI,((DPI)) thrnum=((THRNUM)) ((INVERT)) ((R2L)) ((B2T)) format=((FORMAT))## destroy the window setscript.delete_window_set $set=W## destroy the gerber databasegerber.unload $filedb=Fxxxxxxxxxx## execute clipx_gerber.script on the command-lineqismscript64.exe +script:clipx_gerber.script -log:clipx_gerber.log GERBER=${rs274x_file_path} DPI=${dots_per_inch} FORMAT=TIF [WORKDIR=${working_dir}] [ARCRES=${arc_resolution}] [ARCSAG=${chord_error}[,INCH | MIL | CM | MM | UM]] [BUTTING=${overlap_value}[,INCH | MIL | CM | MM | UM]] [THRNUM=${n_threads}]