Exporting Simulation Mesh and Results from Fusion

Exporting Simulation Mesh and Results from Fusion

mcmillr
Alumni Alumni
6,987 Views
32 Replies
Message 1 of 33

Exporting Simulation Mesh and Results from Fusion

mcmillr
Alumni
Alumni

We have implemented a very basic capability to export the Simulation Mesh and Results from Fusion to VTU format. This format can be viewed in tools such as Paraview.

When you are in a Simulation study and you have results displayed, you can type the following command to export the active result plot:

SimResults.ExportActiveResults d:\my_sim.vtu

You can of course use any path or file name you want.

If you open this in Paraview you can press Apply and it should render the mesh and results.

If you only want the mesh data, you can use this command:

SimMeshDB.Export  0  d:\my_mesh.vtu

 

This should be useful for anyone who would like to implement a custom analysis or rendering that Fusion Sim cannot do. In the future we may move this from the command line to a full fledged UI.

 

Rob McMillan
Software Architect, Fusion Simulation
Autodesk
6,988 Views
32 Replies
Replies (32)
Message 2 of 33

TrippyLighting
Consultant
Consultant

That sounds interesting and could open some interesting creative possibilities.


EESignature

0 Likes
Message 3 of 33

dnaikM5JKG
Contributor
Contributor

Hi,

 

SimResults.ExportActiveResults d:\my_sim.vtu


SimMeshDB.Export 0 d:\my_mesh.vtu

 

are these commands only for windows? If not, could you please let me know the changes that are required for them to work on Mac? I am unable to run them. 

 

solved

SimResults.ExportActiveResults Users/{username}/Desktop/simresults.vtu

 

0 Likes
Message 4 of 33

mcmillr
Alumni
Alumni

Sorry about that, it seem that manually typing the paths on Mac is a little tricky and when the path has a forward slash at the beginning it doesn't recognize the path. If you leave the forward slash off it seems to assume it and the file is written as expected. I will look into whether this can be improved, and perhaps also provide better help for the command with example paths.

 

Rob McMillan
Software Architect, Fusion Simulation
Autodesk
0 Likes
Message 5 of 33

dnaikM5JKG
Contributor
Contributor

Thank you! @mcmillr 

0 Likes
Message 6 of 33

nlmn.vn
Observer
Observer

Hi,

 

I tried to export my results to vtu file and i got this error message

 

ERROR: In E:\.conan\a99cb3\1\source_subfolder\IO\XML\vtkXMLWriter.cxx, line 839
vtkXMLUnstructuredGridWriter (0000025591BB8530): Error opening output file "c:\my_sim.vtu"

ERROR: In E:\.conan\a99cb3\1\source_subfolder\IO\XML\vtkXMLWriter.cxx, line 842
vtkXMLUnstructuredGridWriter (0000025591BB8530): Error code "Permission denied"

ERROR: In E:\.conan\a99cb3\1\source_subfolder\Common\ExecutionModel\vtkExecutive.cxx, line 784
vtkCompositeDataPipeline (00000255F0B3C490): Algorithm vtkXMLUnstructuredGridWriter(0000025591BB8530) returned failure for request: vtkInformation (00000255EFC2A220)
Debug: Off
Modified Time: 2606
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA
ALGORITHM_AFTER_FORWARD: 1
FORWARD_DIRECTION: 0
FROM_OUTPUT_PORT: -1

0 Likes
Message 7 of 33

mcmillr
Alumni
Alumni

You don't have write permission to the root of C:, you either need to run Fusion as an administrator or choose a folder where you have write permissions.

 

Rob McMillan
Software Architect, Fusion Simulation
Autodesk
0 Likes
Message 8 of 33

nlmn.vn
Observer
Observer

solved

 

thank you!

0 Likes
Message 9 of 33

John_Holtz
Autodesk Support
Autodesk Support

Just to clarify, these commands are entered in the TEXT COMMAND window which is shown using "File > View > Show Text Commands". Then,

 

text command export result.png

 

  1. Set "Txt" as the language type.
  2. Enter the command as given in Rob's original post (with the Windows format) or replies (with the Mac format).

 

 

 



John Holtz, P.E.

Global Product Support
Autodesk, Inc.


If not provided, indicate the version of Inventor Nastran you are using.
If the issue is related to a model, attach the model! See What files to provide when the model is needed.
Message 10 of 33

mmilleratticus
Advocate
Advocate

Does this mean there is a way to export a deformed part and 3D print that prediction?

Message 11 of 33

John_Holtz
Autodesk Support
Autodesk Support

Hi @mmilleratticus 

 

What this post means is that you can output the undeformed mesh and whatever result contour you are viewing to a VTU file format.

  • It looks to me that the coordinates of the nodes are given in the file. If you want to export the X, Y, and Z displacements separately and use those results to manually update the coordinates of the nodes, then you would have a deformed mesh.
  • If you have software that can create a 3D print using the VTU file, then you can 3D print it. 

 



John Holtz, P.E.

Global Product Support
Autodesk, Inc.


If not provided, indicate the version of Inventor Nastran you are using.
If the issue is related to a model, attach the model! See What files to provide when the model is needed.
0 Likes
Message 12 of 33

Anonymous
Not applicable

Whilst performing a simulation action I enter "SimMeshDB.Export 0 d:\my_mesh.vtu" into the command line, as specified above.
The response is "This command works only in a Simulation asset."

 

My intention is to be able to export a 3d model of the stock mid-toolpath at various stages, preferably as obj or stl.

Attached is a screenshot.

0 Likes
Message 13 of 33

Anonymous
Not applicable

Found  a way to export stock mid-toolpath by Right Clicking > Stock > Save Stock. Very easy, in case anyone's interested.

0 Likes
Message 14 of 33

mmilleratticus
Advocate
Advocate

Heck yeah I'm interested!  If it doesn't work I'll buy you a beer for trying....ten if it does.

0 Likes
Message 15 of 33

mmilleratticus
Advocate
Advocate

I looks like what you're doing is a machining simulation.  This post is  getting the results in about FEA simulations and exporting the deformed object(s) in a format that can be 3D printed.

 

 

0 Likes
Message 16 of 33

Anonymous
Not applicable

@mmilleratticus you owe me 10 beers then! Worked well, just need to find a way of exporting the milled stock frame by frame. any ideas? Apologies for hijacking another post with my question

0 Likes
Message 17 of 33

mmilleratticus
Advocate
Advocate

I'll buy the first 10 and you buy the second 10.

 

If I understand what you're doing, that might be a job for an software app/script?  I have zero experience with app writing.  I kinda wish I did now.

 

Check this out: https://help.autodesk.com/view/fusion360/ENU/?caas=caas/video/youtube/watch-v-Roe2TRBY6Ko.html

 

Good luck!  Let me know how this evolves. 

0 Likes
Message 18 of 33

charlesmarvic.quito
Observer
Observer

charlesmarvicquito_0-1630960612135.pngIt says No active presentation

0 Likes
Message 19 of 33

John_Holtz
Autodesk Support
Autodesk Support

Hi @charlesmarvic.quito 

 

This command only works in the Simulation workspace and probably only works on the stress analysis types. It may not work for Electronics Cooling or Plastic Injection Molding (both of those are Preview at this time and may not be shown on your computer depending on the choices you set "Preferences > Preview Features").

 

  • What Study Type do you have set?
  • What is the maximum displacement in your results?


John Holtz, P.E.

Global Product Support
Autodesk, Inc.


If not provided, indicate the version of Inventor Nastran you are using.
If the issue is related to a model, attach the model! See What files to provide when the model is needed.
0 Likes
Message 20 of 33

charlesmarvic.quito
Observer
Observer
Hi! It is for my Laboratory exercise which is about simulation of four bar mechanism and data extraction in fusion 360. I am done with the simulation but the problem is, I need to extract (x, y) coordinate data of the joints.
0 Likes