Skip to content
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
1 change: 1 addition & 0 deletions doc/changelog.d/6750.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Design type check and update points cloud extension call
15 changes: 12 additions & 3 deletions src/ansys/aedt/core/extensions/common/points_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,20 @@ def __init__(self, withdraw: bool = False):
self.add_extension_content()

def check_design_type(self):
"""Check if the design type is HFSS, Icepak, HFSS 3D, Maxwell 3D, Q3D, Mechanical"""
if self.aedt_application.design_type not in ["HFSS", "Icepak", "HFSS 3D", "Maxwell 3D", "Q3D", "Mechanical"]:
"""Check if the design type is HFSS, Icepak, HFSS 3D, Maxwell 3D, Maxwell 2D, Q3D, Mechanical"""
if self.aedt_application.design_type not in [
"HFSS",
"Icepak",
"HFSS 3D",
"Maxwell 3D",
"Maxwell 2D",
"Q3D",
"Mechanical",
]:
self.release_desktop()
raise AEDTRuntimeError(
"This extension only works with HFSS, Icepak, HFSS 3D, Maxwell 3D, Q3D, or Mechanical designs."
"This extension only works with HFSS, Icepak, HFSS 3D, "
"Maxwell 3D, Maxwell 2D, Q3D, or Mechanical designs."
)

def __load_aedt_info(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,15 @@ def show_points_popup():

def submit():
if option_var.get() == "Option 1":
from ansys.aedt.core.extensions.common.points_cloud import PointsCloudExtensionData
from ansys.aedt.core.extensions.common.points_cloud import main as points_main

selected_objects = self._widgets["objects_list_lb"].curselection()
objects_list = [self._widgets["objects_list_lb"].get(i) for i in selected_objects]
points = points_entry.get("1.0", tkinter.END).strip()
try:
pts_path = points_main({"is_test": False, "choice": objects_list, "points": int(points)})
data = PointsCloudExtensionData(choice=objects_list, points=int(points))
pts_path = points_main(data)
self._text_size(pts_path, self._widgets["sample_points_entry"])
except Exception as e:
messagebox.showerror("Error", f"Failed to generate points: {str(e)}")
Expand Down