PolyHatch is an AutoCAD script written in lisp language to automate a basic photolithography photomask verification. The purpose of this scrip is to look for closed polylines within a given selection of drawings in a list of layers and hatch them. The generated hatches are grouped for easy handling. This verification step helps finding possible openings in regions that are supposed to form a closed region (solid areas in the photomask) and speeds up the design check rule step from customer perspective. A minor modification may be needed if you want to extent this script to other applications.
1- Drag and drop the Poly_Hatch.lsp script into your AutoCAD window. Choose Load Once/Always Load depending on your preference.
2- Call the function by typing polyhatch
in the command prompt (or anywhere within the active window)
3- Enter the layer names that includes your objects separated by a , i.e. Layer1,Layer2,Layer3
.
4- Make a selection
5- Enter a name for the group made for all hatches.
6- Finished! Here only one closed object was detected in the selection within Layer1 (magenta:Layer1, green:Layer2, orange:Layer3 for this example drawing).
*Note that circle is not a polyline object and was not considered during hatching process.
You can use CAD techniques to make closed polylines. Here I mention two of them:
- make it closed from
properties panel
.
- use
boundary
command to form a closed polyline by picking a point inside a closed region (my favorite!).
It creates a new object, you need to remove previous primary objects manually.
Calling polyhatch
command will result in all features being properly hatched (will show up as solid areas in the final photomask). Here I used all
as layer name and it automatically looks into all available layers.
Feel free to contribute and add new features that might help more people.