# HExtractor

Extract data with hierarchy from GDSII, OASIS and DBLOAD files to either GDSII or OASIS with various options such as clipping, filters, transformations etc.

## Command-line Reference

hextractor64 {input-file} {output-base-path} [INPUT-OPTIONS] [OUTPUT-OPTIONS] [FILTERS] [CLIPPING-REGIONS] [CLIPPING-OPTIONS]

### Required

#### {input-file}

• Path to a valid GDSII, OASIS or DBLOAD file to be used as the source

#### {output-base-path}

• directory + base-name of the output file. Extension will be added automatically based on the output format (.gds or .oas)
• Default: directory = '.' base-name = 'out'

### [INPUT OPTIONS]

#### -cell:{view-cellname}

• 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

#### -diskload

• Load file from disk. This can be useful if the input file is very large w.r.t available system memory. This results in smaller memory footprint and longer extraction times
• Default: File is loaded to memory

#### -load2mem

• Load file to memory. This results in faster execution times but larger memory footprint
• This is the default behavior

### [OUTPUT-OPTIONS]

#### -flatten

• Discard hierarchy. The output file will be a flat file with only ONE cell
• Default: OFF. The output will contain hierarchy wherever applicable

#### -top:{extracted-cellname}

• Specify the name of the top cell in the output
• Default: Same as the cell being extracted (view cell)

#### -xform:POST:xy:{dx},{dy}

• Translate the extracted output by {dx} and {dy} offsets (in file-units)
• Default: dx = dy = 0.0 (No translation)

#### -xform:POST:scale:{scale}

• Scale the extracted output by the specified value (> 0.0)
• Default: 1.0 (No scaling)

#### -xform:POST:angle:{degrees}

• Rotate the extracted output by the specified value in degrees
• Default: 0.0 (No rotation)

#### -xform:POST:mirror

• Mirror the extracted output about the X-axis (flip Y)
• Default: OFF (no mirroring)

#### -oasis

• Extract to OASIS (Output file will have a .oas extension)
• Default: Extract to GDSII (.gds)

### [FILTERS]

#### -layers:{layer-list}

• 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
• Overrides preceeding -layermap:

#### [-layermap:{layer-mapping}]

• Specify a layer mapping for extraction

xxxxxxxxxx{layer-mapping} := [ALL-NULL][,{from}-{to}]+where {from},{to} := {layer}[:{datatype}]e.g -layermap:1-3 (move layers 1:* to 3:*, all other layers extracted as-is)    -layermap:1-3:0 (move layers 1:* to 3:0, all other layers extracted as-is)    -layermap:1:0-3:0 (move 1:0 to 3:0, all other layers extracted as-is)    -layermap:ALL-NULL,1-3 (move layers 1:* to 3:*, drop all other layers)    -layermap:ALL-NULL,1-1 (drop all layers except 1:*) (same as -layers:1)
• Overrides preceeding -layers:

#### -notext

• Do not extract TEXT data
• Default: TEXT data is also extracted wherever applicable

#### -nopaths

• Convert paths to boundaries
• Default: Paths that lie completely in the extracted areas are extracted as paths. Paths that are clipped will be extracted as boundaries. Zero-width paths will be dropped

#### -minpolyarea:{min-poly-area-fileunits}

• Polygons smaller than the specified area (in file-units^2) will be discarded
• Default: min-area = 0.0 file-units^2

#### -sliver:{min-ratio-perimeter-to-area}

• Polygons whose sliver value (perimeter/area) is less than the specified ratio will be discarded (only if clipping is enabled)
• Default: sliver = 0.0

#### -droprefs:ALL:{dos-regex-list}

• Discard cells references that match any of the specified regular expressions (dos-like) all the way down the hierarchy
• e.g -droprefs:ALL:ABC,DEF,GHI,JKL*
• Default: All applicable cells will be extracted
• Overrides any previous -droprefs:VIEW: or -onlyrefs:

#### -droprefs:VIEW:{dos-regex-list}

• Discard cells references that match any of the specified regular expressions (dos-like) ONLY in the current view (immediate children of the cell being extracted). Candidate cells being referenced deeper in the hierarchy will be extracted if applicable
• e.g -droprefs:VIEW:ABC,DEF,GHI,JKL*
• Default: All applicable cells will be extracted
• Overrides any previous -droprefs:ALL: or -onlyrefs:

#### -onlyrefs:{dos-regex-list}

• Extract only references belonging to cells that match any of the specified regular expressions and are immediate children of the cell being extracted
• All boundaries, paths, texts belonging to the view cell will be dropped as will references to cells that don't match any of the expressions
• Overrides any previous -droprefs:VIEW: or -droprefs:ALL:

### [CLIPPING WINDOWS]

• Use one or more options for cumulative effect
• If none specified, the extents of the view cell is used as the default clip window

#### -window:LLUR:{output-name}:{llx},{lly},{urx},{ury}

• Add a box clipping window using min-max extents (in file-units)
• {output-name} is ignored at the moment

#### -window:LLWH:{output-name}:{llx},{lly},{width},{height}

• Add a box clipping window using the lower-left co-ordinate and dimensions (in file-units)
• {output-name} is ignored at the moment

#### -window:CWH:{output-name}:{cx},{cy},{width},{height}

• Add a box clipping window using the center co-ordinate and dimensions (in file units)
• {output-name} is ignored at the moment

#### @windows:LLUR:{output-name}:{list-file}

• Import a set of box clipping windows from a text file
• Each line of the text-file contains the min-max extents of a single box in file units - {llx},{lly},{urx},{ury}
• {output-name} is ignored at the moment

#### @windows:WHLL:{output-name}:{list-file}

• Import a set of box clipping windows from a text file
• The first line contains the {width},{height} of all the boxes in this file. Each subsequent line contains the co-ordinates of the LOWER-LEFT POINT of a single box in file-units
• {output-name} is ignored at the moment

#### @windows:WGC:{output-name}:{list-file}

• Import a set of box clipping windows from a text file
• The first line contains the {width},{height} of all the boxes in this file. Each subsequent line contains the co-ordinates of the CENTER POINT of a single box in file-units
• {output-name} is ignored at the moment

#### -rand:CXY:{output-name}:{roi_llx},{roi_lly},{roi_urx},{roi_ury}:{width},{height}:{count}

• Randomly generate a set of fixed sized box clipping windows over the specified region of interest (ROI). All co-ordinates and dimensions in file-units
• {output-name} is ignored at the moment

#### -polywin:{output-name}:{x},{y}{,{x},{y}}*

• Specify a closed polygonal clipping window using it's x,y co-ordinate pairs in file units. The last x,y pair should be the same as first
• {output-name} is ignored at the moment

#### @polywins:{output-name}:{list-file}

• Import a set of polygonal clipping windows from a text file. Each line in this file represents a single polygon and uses the same format at -polywin:
• {output-name} is ignored at the moment

#### -roundwin:{output-name}:{cx},{cy},{radius},{arcres},{arcsag}

• Specify a circular clipping window. The circle is converted into a polygon. The number of edges in this polygon is controlled by the {arcres} and {arcsag} parameters. {arcres} is the angle subtended by a single edge to the center of the circle (e.g arcres of 9.0 indicates that the polygon will have 360.0/9.0 = 40 edges). {arcsag} is the sagitta of the circular arc that is approximated by each edge of the polygon. If 0.0, this parameter is ignored. The parameter that results in a finer circle becomes the dominant parameter
• {output-name} is ignored at the moment

#### @roundwins:{output-name}:{list-file}

• Import a set of circular clipping windows from a text file. Each line in this file represents a single circle and uses the same format at -roundwin:
• {output-name} is ignored at the moment

#### -complement

• Subtract all of the specified clipping window(s) from the extents of the view cell and use the resulting window(s) as the clipping window(s). In other words, extract everything other than the specified clipping windows
• {output-name} is ignored at the moment

### [CLIPPING OPTIONS]

#### (Default)

• Texts with insertion points on/inside : Extracted as-is
• Texts with insertion points outside : Discarded
• Fully inside boundaries : Extracted as-is
• Partially crossing boundaries : Clipped to the crossing window(s)
• Fully outside boundaries : Discarded
• Fully inside paths : Extracted as-is
• Partially crossing paths : Converted to boundaries and cllipped to the crossing window(s)
• Fully outside paths : Discarded
• Fully inside references : Extracted as-is
• Partially crossing references : Exploded
• Fully outside references : Discarded (along with it's children)

#### -noclip

• Texts with insertion points on/inside : Extracted as-is
• Texts with insertion points outside : Discarded
• Fully inside boundaries : Extracted as-is
• Partially crossing boundaries : Extracted as-is
• Fully outside boundaries : Discarded
• Fully inside paths : Extracted as-is
• Partially crossing paths : Extracted as-is
• Fully outside paths : Discarded
• Fully inside references : Extracted as-is
• Partially crossing references : Extracted as-is
• Fully outside references : Discarded (along with it's children)

#### -drop_partial_polys

• Texts with insertion points on/inside : Extracted as-is
• Texts with insertion points outside : Discarded
• Fully inside boundaries : Extracted as-is
• Partially crossing boundaries : Discarded
• Fully outside boundaries : Discarded
• Fully inside paths : Extracted as-is
• Partially crossing paths : Discarded
• Fully outside paths : Discarded
• Fully inside references : Extracted as-is
• Partially crossing references : Exploded
• Fully outside references : Discarded (along with it's children)

#### -drop_partial_data

• Texts with insertion points on/inside : Extracted as-is
• Texts with insertion points outside : Discarded
• Fully inside boundaries : Extracted as-is
• Partially crossing boundaries : Discarded
• Fully outside boundaries : Discarded
• Fully inside paths : Extracted as-is
• Partially crossing paths : Discarded
• Fully outside paths : Discarded
• Fully inside references : Extracted as-is
• Partially crossing references : Discarded
• Fully outside references : Discarded (along with it's children)

ARTWORK CONVERSION SOFTWARE, INC.
417 Ingalls St. Unit C, Santa Cruz, CA 95060 831.426.6163  email: info@artwork.com