diff --git a/src/ansys/edb/core/layout/layout.py b/src/ansys/edb/core/layout/layout.py index 0eba655744..f8f986febf 100644 --- a/src/ansys/edb/core/layout/layout.py +++ b/src/ansys/edb/core/layout/layout.py @@ -464,3 +464,51 @@ def snap_primitives(self, layer, tol="0.05um", check_connectivity=True): self.__stub.SnapPrimitives( _geometry_simplifications_settings_with_option_msg(self, layer, tol, check_connectivity) ) + + def create_mesh_region( + self, + xy_exp, + pos_z_exp, + neg_z_exp, + use_active_nets, + incl_ref, + ext, + num_x_partitions, + num_y_partitions, + ): + """Designate a mesh region in a design and create partitions for simulation. + + Parameters + ---------- + xy_exp: :class:`.Value` + Horizontal padding on both sides of the new mesh. + pos_z_exp: :class:`.Value` + Vertical padding above the new mesh region. + neg_z_exp: :class:`.Value` + Vertical padding below the new mesh region. + use_active_nets: bool + True will create a new mesh region defined by the active nets in the design. + False will create a new mesh region defined by the dielectric extents in the design. + incl_ref: bool + True will include bot positive nets and reference nets in the definition of the new mesh region. + False will not include bot positive nets and reference nets. + ext: :class:`.ExtentType` + Geometry extent type. + num_x_partitions: int + Number of partitions to create on x axis in the new mesh region. + num_y_partitions: int + Number of partitions to create on y axis in the new mesh region. + """ + self.__stub.CreateMeshRegion( + layout_pb2.CreateMeshRegionMessage( + layout=self.msg, + xy_exp=messages.value_message(xy_exp), + pos_z_exp=messages.value_message(pos_z_exp), + neg_z_exp=messages.value_message(neg_z_exp), + use_active_nets=use_active_nets, + incl_ref=incl_ref, + ext=ext.value, + num_x_partitions=num_x_partitions, + num_y_partitions=num_y_partitions, + ) + )