File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
src/ansys/geometry/core/plotting Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 1+ Make sure export_glb is handling a single polydata object
Original file line number Diff line number Diff line change @@ -557,8 +557,26 @@ def export_glb(
557557 ~pathlib.Path
558558 Path to the exported glb file.
559559 """
560+ # Export to GLB requires merging the object into a single mesh
561+ LOG .debug (
562+ "Exporting to GLB requires merging the object into a single mesh. "
563+ "This may take some time depending on the size of the object."
564+ )
565+ LOG .debug (
566+ "When calling export_glb, if you had previously set the plotting_options "
567+ "'merge_bodies' or 'merge_component' to False, they will be ignored."
568+ )
569+ plotting_options ["merge_component" ] = True
570+ plotting_options ["merge_bodies" ] = True
571+
560572 if plotting_object is not None :
561573 self .plot (plotting_object , ** plotting_options )
574+ else :
575+ LOG .warning (
576+ "If you had previously added the objects to the plotter, "
577+ "make sure that the options 'merge_bodies' and 'merge_component' "
578+ "are set to True, otherwise the export will not work as expected."
579+ )
562580
563581 # Depending on whether a name is provided, the file will be saved with the name
564582 # provided or with a default name (temp_glb). If a name is provided, the file will
You can’t perform that action at this time.
0 commit comments