Skip to main content

High-order curved mesh export from Coreform Cubit to NGSolve/Netgen

Project description

cubit-mesh-export

High-order curved mesh export from Coreform Cubit to NGSolve/Netgen.

Features

  • Cubit plugin: radia_export netgen/gmsh/nastran/vtk APREPRO commands + Export Mesh GUI
  • Arbitrary-order curving (order 1-5) via ACIS geometry projection
  • Label preservation: material (block), boundary (sideset), edge (BBND)
  • Companion JSON: CAD reference values for Volume/Area/Length consistency checking
  • Standalone checker: verify mesh quality without Cubit (check-vol CLI)

Install

pip install cubit-mesh-export
cubit-plugin-install

The second command deploys the plugin binaries (.ccm, .ccl, .pyd) to your Coreform Cubit installation.

Upgrade

pip install --upgrade cubit-mesh-export
cubit-plugin-install

Always run cubit-plugin-install after upgrading to deploy the new binaries.

Usage

Cubit commands (recommended)

After installation, these commands are available in Cubit:

radia_export netgen "model.vol" order 3 overwrite     # NGSolve FEM (.vol)
radia_export gmsh "model.msh" order 2 version 2 overwrite  # GMSH v2.2
radia_export gmsh "model.msh" order 2 version 4 overwrite  # GMSH v4.1
radia_export nastran "model.bdf" order 2 overwrite    # Nastran BDF
radia_export vtk "model.vtk" order 2 overwrite              # VTK Legacy

Or use the Export Mesh menu in the Cubit GUI.

Python API (for scripting / verification)

import netgen       # must import before cubit
import ngsolve
import cubit

cubit.init(['cubit', '-nojournal', '-batch'])
cubit.cmd('open "model.cub5"')

from cubit_mesh_export import extract_curved_mesh
ng_mesh = extract_curved_mesh(cubit, order=3)
ng_mesh.Save("model.vol")

Check (does NOT require Cubit)

check-vol model.vol                         # basic check
check-vol model.vol --json model.vol.json   # compare vs CAD values
from cubit_mesh_export.check import check_consistency
results = check_consistency("model.vol")

Part of the Radia project

Source: github.com/ksugahar/Radia

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cubit_mesh_export-0.5.1-cp312-cp312-win_amd64.whl (122.9 kB view details)

Uploaded CPython 3.12Windows x86-64

File details

Details for the file cubit_mesh_export-0.5.1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cubit_mesh_export-0.5.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f34742c40a7df8cb759075867621a1072b3cb4ed297017c62760119564a008db
MD5 312fa7539383235a4b7dba56e1d10a75
BLAKE2b-256 0f26645e2043b99aea1394d968ed5d19263be1e4c0c317d164d8c92eb39f4186

See more details on using hashes here.

Provenance

The following attestation bundles were made for cubit_mesh_export-0.5.1-cp312-cp312-win_amd64.whl:

Publisher: release-cubit-mesh-export.yml on ksugahar/Radia

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page