Note
Click here to download the full example code
EDB: geometry creation#
This example shows how you can use EDB to create a layout.
Import EDB layout object#
Import the EDB layout object and initialize it on version 2022 R2.
D:\Temp\pyaedt_prj_7PV\pcb_75YMCE.aedb
Add stackup layers#
Add stackup layers.
if edb:
edb.stackup.add_layer("GND")
edb.stackup.add_layer("Diel", "GND", layer_type="dielectric", thickness="0.1mm", material="FR4_epoxy")
edb.stackup.add_layer("TOP", "Diel", thickness="0.05mm")
Create signal net and ground planes#
Create a signal net and ground planes.
if edb:
points = [
[0.0, 0],
[100e-3, 0.0],
]
edb.core_primitives.create_trace(points, "TOP", width=1e-3)
points = [[0.0, 1e-3], [0.0, 10e-3], [100e-3, 10e-3], [100e-3, 1e-3], [0.0, 1e-3]]
edb.core_primitives.create_polygon_from_points(points, "TOP")
points = [[0.0, -1e-3], [0.0, -10e-3], [100e-3, -10e-3], [100e-3, -1e-3], [0.0, -1e-3]]
edb.core_primitives.create_polygon_from_points(points, "TOP")
Create vias with parametric positions#
Create vias with parametric positions.
if edb:
edb.core_padstack.create_padstack("MyVia")
edb.core_padstack.place_padstack([5e-3, 5e-3], "MyVia")
edb.core_padstack.place_padstack([15e-3, 5e-3], "MyVia")
edb.core_padstack.place_padstack([35e-3, 5e-3], "MyVia")
edb.core_padstack.place_padstack([45e-3, 5e-3], "MyVia")
edb.core_padstack.place_padstack([5e-3, -5e-3], "MyVia")
edb.core_padstack.place_padstack([15e-3, -5e-3], "MyVia")
edb.core_padstack.place_padstack([35e-3, -5e-3], "MyVia")
edb.core_padstack.place_padstack([45e-3, -5e-3], "MyVia")
edb.core_nets.plot(None, color_by_net=True)

Save and close EDB#
Save and close EDB.
EDB saved correctly to D:\Temp\pyaedt_prj_7PV\pcb_75YMCE.aedb. You can import in AEDT.
13.676649332046509
Total running time of the script: ( 0 minutes 13.677 seconds)