This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pya | |
import math | |
""" | |
This sample PCell implements a library called "MyLib" with a single PCell that | |
draws a Parray. This parametric array allows the user to modify the angle and | |
magnification of a shape along the rows and columns independently. | |
NOTE: after changing the code, the macro needs to be rerun to install the new | |
implementation. The macro is also set to "auto run" to install the PCell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pya | |
class AreaCalculator(pya.QDialog): | |
""" | |
This class implements a dialog for calculating area of shapes | |
in a layout. The calculator adds up shapes in the currently | |
selected cell and below. | |
""" | |
def button_clicked(self, checked): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pya | |
import math | |
""" | |
This sample PCell implements a library called "MyLib" with a single PCell that | |
draws a sprial. It demonstrates the basic implementation techniques for a PCell | |
and how to use the "guiding shape" feature to implement a handle for the inner | |
and out radii of the spiral. | |
NOTE: after changing the code, the macro needs to be rerun to install the new |