May I ask how to export the established model to OBJ format so that third-party software can open it? #2819
-
`from ansys.mapdl.core import launch_mapdl mapdl = launch_mapdl() b1 = mapdl.block(-130, 130, -30, 30, -20, 20) mapdl.finish() mapdl.vplot(show_lines=True, quality=5) nodes = mapdl.mesh.nodes mapdl.save("C:/Software/Qt_Project/demo6/ansys_module/model", ext="obj", slab="MODEL") What is the reason why the OBJ format file obtained in this way cannot be opened in Blender? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @COOLEST-GET Instead try to use the PyVista obj exporter . There are examples on the PyMAPDL doc site that show how to create a mesh object (mapdl.mesh.grid) then add this mesh to a PyVista plotter object. So as an example say you wanted to export that VPLOT, I think this will work: pl = mapdl.vplot(quality=5, return_plotter=True)
pl.export_obj("volume.obj") Mike |
Beta Was this translation helpful? Give feedback.
Hi @COOLEST-GET
The "mapdl.save" command is saving to the MAPDL binary database format. It does not support saving to any other formats. And changing the extension does not change the file format.
Instead try to use the PyVista obj exporter . There are examples on the PyMAPDL doc site that show how to create a mesh object (mapdl.mesh.grid) then add this mesh to a PyVista plotter object.
So as an example say you wanted to export that VPLOT, I think this will work:
Mike