Skip to content

Commit

Permalink
FIX: Export model obj and rename argument (#5444)
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys authored Nov 18, 2024
1 parent 2d1e606 commit ed3aab4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ansys/aedt/core/hfss.py
Original file line number Diff line number Diff line change
Expand Up @@ -6132,7 +6132,7 @@ def get_hdm_plotter(self, file_name=None):
from ansys.aedt.core.visualization.advanced.hdm_plot import HDMPlotter

hdm = HDMPlotter()
files = self.post.export_model_obj(export_as_single_objects=True, air_objects=False)
files = self.post.export_model_obj(export_as_multiple_objects=True, air_objects=False)
for file in files:
hdm.add_cad_model(file[0], file[1], file[2], self.modeler.model_units)
hdm.add_hdm_bundle_from_file(file_name)
Expand Down
12 changes: 6 additions & 6 deletions src/ansys/aedt/core/visualization/post/post_common_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2202,8 +2202,8 @@ def get_far_field_data(self, expressions="GainTotal", setup_sweep_name="", domai
return False
return solution_data

@pyaedt_function_handler(obj_list="assignment")
def export_model_obj(self, assignment=None, export_path=None, export_as_single_objects=False, air_objects=False):
@pyaedt_function_handler(obj_list="assignment", export_as_single_objects="export_as_multiple_objects")
def export_model_obj(self, assignment=None, export_path=None, export_as_multiple_objects=False, air_objects=False):
"""Export the model.
Parameters
Expand All @@ -2213,9 +2213,9 @@ def export_model_obj(self, assignment=None, export_path=None, export_as_single_o
case export every model object except 3D ones and vacuum and air objects.
export_path : str, optional
Full path of the exported OBJ file.
export_as_single_objects : bool, optional
Whether to export the model as single object. The default is ``False``, in which
case is exported asa list of objects for each object.
export_as_multiple_objects : bool, optional
Whether to export the model as multiple objects or not. Default is ``False``
in which case the model is exported as single object.
air_objects : bool, optional
Whether to export air and vacuum objects. The default is ``False``.
Expand Down Expand Up @@ -2244,7 +2244,7 @@ def export_model_obj(self, assignment=None, export_path=None, export_as_single_o
and self._app.modeler[i].material_name.lower() != "air"
)
]
if not export_as_single_objects:
if export_as_multiple_objects:
files_exported = []
for el in assignment:
fname = os.path.join(export_path, f"{el}.obj")
Expand Down

0 comments on commit ed3aab4

Please sign in to comment.