Convert Salomé-Meca MED meshes and Code_Aster .comm files into NumPy-ready Python data.
Project description
Salome2Py
CLI that converts a Salomé-Meca MED mesh plus its matching Code_Aster .comm file into NumPy-friendly Python arrays (node, elem, mater, pdof, nodf, etc.).
Installation (pipx)
pipx keeps console tools isolated per-virtualenv and works the same on Linux, macOS, and Windows.
-
Install pipx
- Linux/macOS:
python3 -m pip install --user pipx python3 -m pipx ensurepath
- Windows (PowerShell):
py -m pip install --user pipx py -m pipx ensurepath
Reload the shell so the
pipxpath is active. - Linux/macOS:
-
Install Salome2Py
- From PyPI (once published):
pipx install Salome2Py
- From a local clone:
pipx install .
- From PyPI (once published):
This exposes the Salome2Py command globally without polluting your base interpreter. (You can still run python main.py ... directly if you prefer.)
Usage
Salome2Py [-m] [-b] [-o output.py] path/to/case.med path/to/case.comm
-m,--mater— include the material matrix parsed fromDEFI_MATERIAU(AFFE_MATERIAUmust map groups to materials).-b,--boundary— include prescribed DOFs (pdof) and nodal loads (nodf) derived fromDDL_IMPO/FORCE_FACE.-o,--output— optional destination file (defaults to<case_folder>.py).
By default, the generated Python file is written to the directory where you invoke the command (e.g., running inside /tmp creates /tmp/input.py for an Input/ case). Use -o to override the path.
Without -m or -b, the generator writes only node, elem, eltp, and bc_method, skipping the more expensive parsing steps automatically.
Development
Install deps once (if you are not using the packaged CLI):
python -m pip install --break-system-packages meshio h5py
Then run the tool directly:
python main.py -m -b Input/DoubleCubeCase.med Input/DoubleCubeCase.comm
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file salome2py-0.4.0.tar.gz.
File metadata
- Download URL: salome2py-0.4.0.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bac9abffb3c49e341f6115d53ffc056dba9ba6c89b505aa11a5dcc7d9312b127
|
|
| MD5 |
2db71a59736fb403bfc8c9898195f156
|
|
| BLAKE2b-256 |
379344fba7d13cf1ec85b0516f06e3f5adc591d629747d4b94bc718f8ebe4656
|
File details
Details for the file salome2py-0.4.0-py3-none-any.whl.
File metadata
- Download URL: salome2py-0.4.0-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4acb55f4dc902887fcef770ed32326d77029f37324ba027ff9f4f6ae249f9207
|
|
| MD5 |
e1e602ba4911309818c0bf6f9fa28a1e
|
|
| BLAKE2b-256 |
f55ab392777a527ef39593145fa456130eaa6bd57e3f46d13a283dbeb47df634
|