Skip to content

Commit fa8b3a4

Browse files
authored
Fix edb merge with 3d placement when layout is flipped and placed on bottom (#899)
* Minor fix on 3d placement when layout is placed on bottom and object is flipped * Minor Fixes Co-authored-by: maxcapodi78 <Shark78>
1 parent c37730f commit fa8b3a4

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

pyaedt/edb_core/stackup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def place_in_layout_3d_placement(
533533
else:
534534
h_stackup = self._edb_value(topz + solder_height - bottomz_s)
535535
elif flipped_stackup:
536-
h_stackup = self._edb_value(bottoml_s.GetThickness() + bottomz - solder_height - bottomz_s)
536+
h_stackup = self._edb_value(topl.GetThickness() + bottomz - solder_height - bottomz_s)
537537
else:
538538
h_stackup = self._edb_value(bottomz - solder_height - topz_s)
539539

pyaedt/generic/toolkit.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -798,12 +798,18 @@ def local_path(self):
798798
@property
799799
def settings_file(self):
800800
"""Settings json file path."""
801-
return self.settings_manager.settings_file
801+
try:
802+
return self.settings_manager.settings_file
803+
except:
804+
return ""
802805

803806
@property
804807
def settings_data(self):
805808
"""Settings json file data."""
806-
return self.settings_manager.settings_data
809+
try:
810+
return self.settings_manager.settings_data
811+
except:
812+
return None
807813

808814
@property
809815
def local_settings_file(self):
@@ -1626,6 +1632,8 @@ def write_settings(self, user_defined_data=None):
16261632
Dictionary with arbitrary user data (needs to be json serializable).
16271633
"""
16281634
settings_data = self.settings_data
1635+
if not settings_data:
1636+
return False
16291637
with open(self.settings_file, "w") as f:
16301638

16311639
for text_control in self.SetText:

0 commit comments

Comments
 (0)