Overview Version History Q & A Rating & Review
CGX FBD VS Code Extension
VS Code extension providing syntax highlighting and language support for CGX .fbd pre/post processor script files used with the CalculiX finite element analysis suite.
Features
Syntax highlighting for CGX .fbd script files
Token recognition for:
Commands (pnt, line, surf, body, mesh, send, view, plot, …)
Geometry and meshing keywords
Parameters and identifiers
Numeric constants (integer, decimal, scientific notation)
Comments (#)
Code folding by logical script sections
Supported File Types
Extension
Description
.fbd
CGX pre/post processor script
What is CGX?
CGX (CalculiX GraphiX) is the pre/post processor bundled with the CalculiX open-source FEA package. It is used to:
Pre-processing — generate geometry, define mesh topology, assign element types, boundary conditions, and export .inp files for the CalculiX solver (CCX)
Post-processing — read solver result files and visualize deformations, stresses, and other field outputs
FBD scripts drive CGX non-interactively and are the primary authoring format for automated model pipelines.
Example .fbd File
# Define geometry points
pnt p1 0.0 0.0 0.0
pnt p2 1.0 0.0 0.0
pnt p3 1.0 1.0 0.0
pnt p4 0.0 1.0 0.0
# Define lines
line l1 p1 p2 10
line l2 p2 p3 10
line l3 p3 p4 10
line l4 p4 p1 10
# Define surface
surf s1 l1 l2 l3 l4
# Set element type and mesh
elty all he8
mesh all
# Export to CalculiX input file
send all abq
Building the Extension
npm install
npm run compile # compile TypeScript → out/
npm run package # compile + vsce package → .vsix
Press F5 in VS Code to launch the Extension Development Host for testing.
License
MIT — see LICENSE