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

Clear error when GetFaceCenter fails #3796

Merged
merged 2 commits into from
Oct 25, 2023
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
3 changes: 3 additions & 0 deletions pyaedt/aedt_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,9 @@ def clear_messages(self, proj_name=None, des_name=None, level=2):

>>> hfss.clear_messages(level=3)

Clear all messages.

>>> hfss.clear_messages(proj_name="", des_name="", level=3)
"""
if self._log_on_desktop:
if proj_name is None:
Expand Down
1 change: 1 addition & 0 deletions pyaedt/modeler/cad/elements3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ def center(self):
try:
return [float(i) for i in self.oeditor.GetFaceCenter(self.id)]
except: # pragma: no cover
self.logger.clear_messages()
vtx = self.vertices[:]
if len(vtx) > 1:
return GeometryOperators.get_polygon_centroid([pos.position for pos in vtx])
Expand Down
Loading