Triangular mesh conversion from MATLAB to NASTRAN (ASCII) format and vice versa

Four zipped MATLAB scripts supporting export/import of NASTRAN (ASCII) triangular meshes
1.4K Downloads
Updated 13 Nov 2012

View License

The zipped package includes four scripts used for triangular mesh conversion from MATLAB to NASTRAN (ASCII) format and vice versa. The NASTRAN format is importable to commercial FEM solvers such as ANSYS/Ansoft.

Content:
nastranmat.m
% Reads a triangular mesh in NASTRAN ASCII format and saves it as a *.mat file.

meshviewer.m
% Plots a triangular mesh: edges, curvature, outer normal vectors

matnastran.m
% Reads a MATLAB (*.mat file) triangular mesh and saves it in ASCII NASTRAN format as a *.nas file.

normalcheck.m
% Checks if the outer normal vectors of the triangular mesh follow the right-hand rule. If they do not, the script rearranges triangle vertices accordingly.

brain_low.nas
% Low-resolution brain model from the Visible Human Project (female) in NASTRAN (ASCII) format used as an example.

Unpack the package and run the scripts following the above sequence. More open-source mesh examples are available at http://www.nevaelectromagnetics.com/.

Cite As

Sergey Makarov (2024). Triangular mesh conversion from MATLAB to NASTRAN (ASCII) format and vice versa (https://www.mathworks.com/matlabcentral/fileexchange/39033-triangular-mesh-conversion-from-matlab-to-nastran-ascii-format-and-vice-versa), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Biomedical Imaging in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

Changes in file descriptions.

1.0.0.0