Skip to content

Commit

Permalink
FEATURE: Add model_type in AdvancedSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchienjacklin committed Sep 6, 2024
1 parent 2f2e247 commit f4c2276
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/ansys/edb/core/simulation_setup/simulation_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""

Expand Down Expand Up @@ -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."""
Expand Down

0 comments on commit f4c2276

Please sign in to comment.