diff --git a/pyproject.toml b/pyproject.toml index cf8b6b5247..0aff24557e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ # FIXME: add ansys-api-edb version dependencies = [ - "ansys-api-edb==1.0.1", + "ansys-api-edb==1.0.2", "protobuf>=3.19.3,<4", "grpcio>=1.44.0" ] diff --git a/src/ansys/edb/core/hierarchy/hierarchy_obj.py b/src/ansys/edb/core/hierarchy/hierarchy_obj.py index 672db91192..94027751a8 100644 --- a/src/ansys/edb/core/hierarchy/hierarchy_obj.py +++ b/src/ansys/edb/core/hierarchy/hierarchy_obj.py @@ -16,7 +16,7 @@ class HierarchyObj(conn_obj.ConnObj): def transform(self): """:class:`Transform `: Transformation information of the hierarchy object.""" transform_msg = self.__stub.GetTransform(self.msg) - return Transform( + return Transform.create( transform_msg.scale, transform_msg.angle, transform_msg.mirror, diff --git a/src/ansys/edb/core/inner/messages.py b/src/ansys/edb/core/inner/messages.py index 0857e8028e..fce3aee175 100644 --- a/src/ansys/edb/core/inner/messages.py +++ b/src/ansys/edb/core/inner/messages.py @@ -810,13 +810,13 @@ def term_find_by_name_message(layout, name): def term_get_product_solver_message(term, product_id): """Convert to a ``TermGetProductSolversMessage`` object.""" - return TermGetProductSolversMessage(term=term.msg, product_id=product_id) + return TermGetProductSolversMessage(term=term.msg, product_id=product_id.value) def term_set_solver_option_message(term, product_id, name, option): """Convert to a ``TermSetSolverOptionMessage`` object.""" return TermSetSolverOptionMessage( - term=term.msg, product_id=product_id, name=name, option=option + term=term.msg, product_id=product_id.value, name=name, option=option ) @@ -964,6 +964,7 @@ def mesh_operation_message(mesh_op): refine_inside=mesh_op.refine_inside, mesh_region=mesh_op.mesh_region, net_layer_info=[_mesh_op_net_layer_message(*nl) for nl in mesh_op.net_layer_info], + solve_inside=mesh_op.solve_inside, ) if isinstance(mesh_op, LengthMeshOperation): mesh_op_msg.length_mesh_op.CopyFrom(_length_mesh_operation_message(mesh_op)) diff --git a/src/ansys/edb/core/inner/parser.py b/src/ansys/edb/core/inner/parser.py index 16432c0a0a..0102e3bf3e 100644 --- a/src/ansys/edb/core/inner/parser.py +++ b/src/ansys/edb/core/inner/parser.py @@ -473,6 +473,7 @@ def _to_mesh_op(message): mesh_op.enabled = message.enabled mesh_op.mesh_region = message.mesh_region mesh_op.refine_inside = message.refine_inside + mesh_op.solve_inside = message.solve_inside for nli in message.net_layer_info: mesh_op.net_layer_info.append((nli.net, nli.layer, nli.is_sheet)) return mesh_op diff --git a/src/ansys/edb/core/primitive/primitive.py b/src/ansys/edb/core/primitive/primitive.py index aaf38961b0..b207f6a07e 100644 --- a/src/ansys/edb/core/primitive/primitive.py +++ b/src/ansys/edb/core/primitive/primitive.py @@ -885,6 +885,12 @@ def render(cls, width, end_cap1, end_cap2, corner_style, path): ) ) + @property + @parser.to_polygon_data + def polygon_data(self): + """:class:`PolygonData `: Polygon data of this Path.""" + return self.__stub.GetPolygonData(self.msg) + @property @parser.to_polygon_data def center_line(self): diff --git a/src/ansys/edb/core/simulation_setup/mesh_operation.py b/src/ansys/edb/core/simulation_setup/mesh_operation.py index 89dcdb8962..e4d65277ad 100644 --- a/src/ansys/edb/core/simulation_setup/mesh_operation.py +++ b/src/ansys/edb/core/simulation_setup/mesh_operation.py @@ -17,6 +17,8 @@ class MeshOperation: Whether to refine inside. mesh_region : str, default: "" Mesh region. + solve_inside : bool, default: False + Whether to solve inside. """ def __init__( @@ -26,6 +28,7 @@ def __init__( enabled=True, refine_inside=False, mesh_region="", + solve_inside=False, ): """Create a mesh operation.""" self._name = name @@ -33,6 +36,7 @@ def __init__( self._enabled = enabled self._refine_inside = refine_inside self._mesh_region = mesh_region + self._solve_inside = solve_inside @property def name(self): @@ -83,6 +87,15 @@ def mesh_region(self): def mesh_region(self, mesh_region): self._mesh_region = mesh_region + @property + def solve_inside(self): + """:obj:`bool`: Flag indicating if solve inside is enabled.""" + return self._solve_inside + + @solve_inside.setter + def solve_inside(self, solve_inside): + self._solve_inside = solve_inside + class SkinDepthMeshOperation(MeshOperation): """Represents a skin depth mesh operation. @@ -100,6 +113,8 @@ class SkinDepthMeshOperation(MeshOperation): Whether to refine inside. mesh_region : str, default: "" Mesh region. + solve_inside : bool, default: False + Whether to solve inside. skin_depth : str, default: "1um" Skin depth.`. surface_triangle_length : str, default: "1mm" @@ -119,6 +134,7 @@ def __init__( enabled=True, refine_inside=False, mesh_region="", + solve_inside=False, skin_depth="1um", surface_triangle_length="1mm", num_layers="2", @@ -126,7 +142,7 @@ def __init__( restrict_max_elements=False, ): """Create a skin depth mesh operation.""" - super().__init__(name, net_layer_info, enabled, refine_inside, mesh_region) + super().__init__(name, net_layer_info, enabled, refine_inside, mesh_region, solve_inside) self._skin_depth = skin_depth self._surface_triangle_length = surface_triangle_length self._num_layers = num_layers @@ -195,6 +211,8 @@ class LengthMeshOperation(MeshOperation): Whether to refine inside. mesh_region : str, default: "" Mesh region. + solve_inside : bool, default: False + Whether to solve inside. max_length : str, default: "1mm" maximum length of the mesh elements. restrict_max_length : str, default: True @@ -212,13 +230,14 @@ def __init__( enabled=True, refine_inside=False, mesh_region="", + solve_inside=False, max_length="1mm", restrict_max_length=True, max_elements="1000", restrict_max_elements=False, ): """Initialize an instance of a skin depth mesh operation.""" - super().__init__(name, net_layer_info, enabled, refine_inside, mesh_region) + super().__init__(name, net_layer_info, enabled, refine_inside, mesh_region, solve_inside) self._max_length = max_length self._restrict_max_length = restrict_max_length self._max_elements = max_elements