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: Maxwell icepak example #5596

Merged
merged 3 commits into from
Dec 18, 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
6 changes: 3 additions & 3 deletions src/ansys/aedt/core/icepak.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ def assign_surface_monitor(self, face_name, monitor_type="Temperature", monitor_
>>> icepak.assign_surface_monitor("Surface1", monitor_name="monitor")
'monitor'
"""
return self._monitor.assign_surface_monitor(face_name, monitor_quantity=monitor_type, monitor_name=monitor_name)
return self.monitor.assign_surface_monitor(face_name, monitor_quantity=monitor_type, monitor_name=monitor_name)

@pyaedt_function_handler()
def assign_point_monitor(self, point_position, monitor_type="Temperature", monitor_name=None):
Expand Down Expand Up @@ -994,7 +994,7 @@ def assign_point_monitor(self, point_position, monitor_type="Temperature", monit
'monitor1'

"""
return self._monitor.assign_point_monitor(
return self.monitor.assign_point_monitor(
point_position, monitor_quantity=monitor_type, monitor_name=monitor_name
)

Expand Down Expand Up @@ -1031,7 +1031,7 @@ def assign_point_monitor_in_object(self, name, monitor_type="Temperature", monit
>>> icepak.assign_point_monitor(box.name, monitor_name="monitor2")
"'monitor2'
"""
return self._monitor.assign_point_monitor_in_object(
return self.monitor.assign_point_monitor_in_object(
name, monitor_quantity=monitor_type, monitor_name=monitor_name
)

Expand Down
5 changes: 1 addition & 4 deletions src/ansys/aedt/core/modeler/cad/elements_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1451,10 +1451,7 @@ def properties(self):

props = _get_data_model(self.child_object)
for p in self.child_object.GetPropNames():
if p in props:
self._props[p] = props[p]
else:
self._props[p] = None
self._props[p] = props.get(p, None)
except Exception:
for p in self.child_object.GetPropNames():
try:
Expand Down
10 changes: 7 additions & 3 deletions src/ansys/aedt/core/modules/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1177,9 +1177,13 @@ def assign_length_mesh(self, assignment, inside_selection=True, maximum_length=1

mop = MeshOperation(self, name, props, "LengthBased")
for meshop in self.meshoperations[:]:
if meshop.name == mop.name:
meshop.delete()
break
try:
if meshop.name == mop.name:
meshop.delete()
break
# Handle case where mop has no child_object
except AttributeError:
continue
mop.create()
self.meshoperations.append(mop)
return mop
Expand Down
Loading