HatchGround#

class pyedb.libraries.rf_libraries.base_functions.HatchGround(edb_cell: Edb | None = None, pitch: str | float = 0.01707, width: str | float = 0.005, fill_target: str | float = 50.0, ground_width: str | float = 0.1, ground_length: str | float = 0.1, layer_gnd: str = 'GND', angle: float = 0.0)#

Create a rectangular demo board whose ground layer is filled with an orthogonal hatched copper pattern.

Any requested copper fill ratio between 10 % and 90 % can be realised. The hatch is generated by drawing orthogonal copper stripes and then punching square voids to achieve the desired fill percentage.

Parameters:
edb_cellEdb, optional

EDB layout database in which the geometry will be created. If omitted, the object is created in a detached state and must be attached to an EDB instance via the _edb attribute before calling create().

pitchfloat or str, default 17.07e-3

Centre-to-centre distance between adjacent hatch bars [m].

widthfloat or str, default 5.0e-3

Width of each copper bar [m].

fill_targetfloat or str, default 50.0

Desired copper area in percent (10 … 90).

ground_widthfloat or str, default 100.0e-3

Width (x-span) of the rectangular board [m].

ground_lengthfloat or str, default 100.0e-3

Length (y-span) of the rectangular board [m].

layer_gndstr, default “GND”

Name of the layer that receives the hatch pattern.

anglefloat, default 0.0

Rotation angle of the hatch pattern in degrees. A positive value rotates the pattern counter-clockwise around the board centre.

Examples

>>> hatch = HatchGround(pitch=0.5e-3, width=0.2e-3, fill_target=70, ground_width=5e-3, ground_length=5e-3)
>>> edb = Edb("demo.aedb")
>>> hatch._edb = edb
>>> hatch.create()
>>> round(hatch.copper_fill_ratio, 1)
70.0
Attributes:
copper_fill_ratiofloat

Return the actual copper fill ratio in percent.

Methods

HatchGround.create()

Generate the stack-up, board outline and hatch pattern.