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

FIX: Material with import stackup file #688

Merged
merged 16 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -2459,7 +2459,6 @@ def _read_cfg(self): # pragma: no cover
--------

>>> from pyedb import Edb
>>> from dotnet.edb_core.edb_data.simulation_configuration import SimulationConfiguration
>>> config_file = path_configuration_file
>>> source_file = path_to_edb_folder
>>> edb = Edb(source_file)
Expand All @@ -2478,7 +2477,7 @@ def _read_cfg(self): # pragma: no cover
cfg_lines = cfg_file.read().split("\n")
for line in cfg_lines:
if line.strip() != "":
if line.find("="):
if line.find("=") > 0:
i, prop_value = line.strip().split("=")
value = prop_value.replace("'", "").strip()
if i.lower().startswith("generatesolderballs"):
Expand Down
10 changes: 6 additions & 4 deletions src/pyedb/dotnet/edb_core/materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ def dc_conductivity(self):
@dc_conductivity.setter
def dc_conductivity(self, value: Union[int, float]):
"""Set material dielectric conductivity."""
if self.__dc_model:
if self.__dc_model and value:
self.__dc_model.SetDCConductivity(value)
else:
self.__edb.logger.error(f"DC conductivity cannot be updated in material without DC model.")
self.__edb.logger.error(f"DC conductivity cannot be updated in material without DC model or value {value}.")

@property
def dc_permittivity(self):
Expand All @@ -227,10 +227,12 @@ def dc_permittivity(self):
@dc_permittivity.setter
def dc_permittivity(self, value: Union[int, float]):
"""Set material dielectric relative permittivity"""
if self.__dc_model:
if self.__dc_model and value:
self.__dc_model.SetDCRelativePermitivity(value)
else:
self.__edb.logger.error(f"DC permittivity cannot be updated in material without DC model.")
self.__edb.logger.error(
f"DC permittivity cannot be updated in material without DC model or value {value}." f""
)

@property
def dielectric_model_frequency(self):
Expand Down
Loading