dmarc3 / vscode-nastran

Nastran Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=mbakke.vscode-nastran&ssr=false
MIT License
9 stars 3 forks source link

Nastran Extension for Visual Studio Code

Repository  |  Issues  |  Changelog  |  License  |  Contribution Guidelines  |  Code of Conduct

This Visual Studio Code extension aims to build Nastran "language" support with features akin to what software developers are accustomed to in their Integrated Development Environments (IDEs) while programming. Nastran stands for "NASA STRuctural ANalysis" and is a finite element analysis software used to predict the behavior of a physical structure. While Nastran is not a programming language itself, Nastran models share many similarites to a programming language. These models are composed of text files built with a defined structure using keywords to identify model parameters and can be "compiled" and executed.

The ultimate goal of this project is to provide a more efficient means of manipulating Nastran finite element models at the text file level through elimination of some of the key pain points and provide a more IDE-like experience.

Note There are several flavors of Nastran. This extension is specifically built for MSC Nastran; however, it may be expanded in the future to support Simcenter Nastran and the original NASTRAN-95. There is significant overlap between the various versions of Nastran and this extension may still prove useful even if you are not using MSC Nastran.

Requirements

In order to use this extension, the user must have the following installed:

Usage

Once the requirements are satisfied and the extension is installed through Visual Studio Marketplace, the extension will automatically activate upon opening a Nastran file with the following extensions:

If opening a Nastran file with a different extension, users may set the language by pressing CTRL + K followed by M and selecting Nastran. If you would like to permanently set the language for the given file extension, select the Configure File Association for 'XXX'... option.

Features

Currently supported features include:

  1. Syntax Highlighting

    • Color delineation between Nastran sections
      • File Management
      • Executive Control
      • Case Control
      • Bulk Data
    • Long and short format field highlighting
  2. Documentation on keyword hover

      Documentation Hover Example

  3. Include file hierarchy tree view for easy navigation of model. Open top level Nastran run deck and run command (keybound to F7) to parse include paths and generate tree view. Command tied to "refresh" button on view.

      Include Hierarchy Example

  4. Open file right click context menu for INCLUDE lines.

      Open File Menu

  5. "Find All" command (keybound to ALT + F) to search model for all substring occurrences and provide hyperlink to location in model.

      Find All Example

  6. Nastran execution command (keybound to F6)

    • Nastran keyword arguments may be set via the Nastran: Set execution keywords command (accessed via CTRL + SHIFT + P)
  7. Text completions with field names for rapid editing

      Text Completions Example

  8. Command to insert short and long field delineation comments (F9, F10)

    • Users defined comments may be set via the Nastran: Set short field delineation comment and Nastran: Set long field delineation comment commands (accessed via CTRL + SHIFT + P)

In addition to these features, the following are proposed features with no feasibility assessment or time table for implementation:

If you have an idea for a feature, please create an issue and flag it as a Feature Request.

Bug Reporting and Known Issues

Please create an issue as bugs are discovered. Provide specific details including screen shots or specific Nastran cards causing the bug.