Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Add mesh region support #453

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions src/ansys/edb/core/layout/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
)
Loading