From f4c22765d4f7de59eb770a8ae98a5f58fddf0a93 Mon Sep 17 00:00:00 2001 From: chenchienjacklin <104948990+chenchienjacklin@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:56:40 -0700 Subject: [PATCH] FEATURE: Add model_type in AdvancedSettings --- .../simulation_setup/simulation_settings.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/ansys/edb/core/simulation_setup/simulation_settings.py b/src/ansys/edb/core/simulation_setup/simulation_settings.py index 0ad1ca83a9..7dcff5309d 100644 --- a/src/ansys/edb/core/simulation_setup/simulation_settings.py +++ b/src/ansys/edb/core/simulation_setup/simulation_settings.py @@ -25,6 +25,13 @@ class ViaStyle(Enum): NUM_VIA_STYLE = pb.NUM_VIA_STYLE +class ModelType(Enum): + """Enum representing defeature model types.""" + + GENERAL_MODEL = pb.GENERAL_MODEL + IC_MODEL = pb.IC_MODEL + + class SimulationSettingsBase: """Internal base class for simulation settings.""" @@ -219,6 +226,19 @@ def via_material(self): def via_material(self, via_material): self.__stub.SetViaMaterial(messages.string_property_message(self, via_material)) + @property + def model_type(self): + """:class:`.ModelType`: model type.""" + return ModelType(self.__stub.GetModelType(self.msg).defeature_model_type) + + @model_type.setter + def model_type(self, model_type): + self.__stub.SetModelType( + pb.DefeatureModelTypePropertyMessage( + target=self.msg, defeature_model_type=model_type.value + ) + ) + class AdvancedMeshingSettings(SimulationSettingsBase): """Class representing base advanced meshing simulation settings."""