Skip to content

Commit

Permalink
Merge pull request #419 from ansys/release/0.1.7_dm_0
Browse files Browse the repository at this point in the history
Publish pyedb-core v0.1.7
  • Loading branch information
drewm102 authored Sep 17, 2024
2 parents c6a8dd7 + aa009df commit aaa5da6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/source/api/simulation_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Enums
hfss_simulation_settings.BasisFunctionOrder
hfss_simulation_settings.SolverType
simulation_settings.ViaStyle
simulation_settings.ModelType
siwave_simulation_settings.SParamInterpolation
siwave_simulation_settings.SParamExtrapolation
siwave_simulation_settings.SParamDCBehavior
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi"
[project]
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
name = "ansys-edb-core"
version = "0.1.6"
version = "0.1.7"
description = "A python wrapper for Ansys Edb service"
readme = "README.rst"
requires-python = ">=3.8"
Expand All @@ -26,7 +26,7 @@ classifiers = [

# FIXME: add ansys-api-edb version
dependencies = [
"ansys-api-edb==1.0.6",
"ansys-api-edb==1.0.7",
"protobuf>=3.19.3,<5",
"grpcio>=1.44.0"
]
Expand Down
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 aaa5da6

Please sign in to comment.