# unv2ccx
**Repository Path**: uesoft/unv2ccx
## Basic Information
- **Project Name**: unv2ccx
- **Description**: Salome universal to CalculiX converter. Converts UNV mesh to the CalculiX INP format.
- **Primary Language**: Python
- **License**: GPL-3.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2022-08-21
- **Last Updated**: 2023-03-23
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
© Ihor Mirzov, 2019-2021
Distributed under GNU General Public License v3.0
[](https://pypi.org/project/unv2ccx)
[](https://pypistats.org/packages/unv2ccx)
[](https://github.com/calculix/unv2ccx)
[](https://github.com/calculix/unv2ccx/releases)
---
[Downloads](https://github.com/calculix/unv2ccx/releases) |
[How to use](#how-to-use) |
[Screenshots](#screenshots) |
[Your help](#your-help) |
[For developers](#for-developers) |
[TODO](#todo)
---
# Salome to CalculiX converter (unv to inp)
Converts [Salome](https://www.salome-platform.org/) .unv file to [CalculiX](http://dhondt.de/) .inp format.
This converter is based on Joël's Cugnoni UNV parser available with [CalculiX Launcher](http://www.calculixforwin.com/) distribution. I allowed myself to slightely improve it and translate into Python 3. INPWriter's methods are fully refactored and now allow to convert beams. See folder [examples](./examples) for list of tested UNV elements. All generated INP files are processed by CalculiX GraphiX and [CalculiX Adanced Environment](https://github.com/calculix/cae) without any errors.
Thanks to [Niclas Stenberg](https://github.com/Xnst) for fixing bug with empty sets.
# How to use
Download Linux and Windows binaries from the [releases page](https://github.com/calculix/unv2ccx/releases). Binaries don't need to be installed.
Result INP-file name is the same as UNV-file name. So only one argument should be passed to the converter:
in Linux: ./unv2ccx file.unv
in Windows: unv2ccx.exe file.unv
# Screenshots
1D and 2D UNV elements in Salome:

Converted 1D and 2D elements in CalculiX GraphiX:

3D UNV elements in Salome:

Converted 3D elements in CalculiX GraphiX:

# Your help
Please, you may:
- Star this project.
- Simply use this software and ask questions.
- Share your models and screenshots.
- Report problems by [posting issues](https://github.com/calculix/unv2ccx/issues).
# For developers
[](https://www.python.org/downloads/)
[](https://code.visualstudio.com/)
To run this converter from source you'll need [Python 3](https://www.python.org/downloads/).
Install *unv2ccx* package with command:
pip3 install unv2ccx
In your code use unv2ccx package in this way:
import unv2ccx
c = unv2ccx.Converter(unv_file_name)
c.run()
If you have Python version >= 3.8 create binary with [nuitka](https://nuitka.net/):
pip3 install nuitka
In Windows:
set CC=C:\\MinGW64\\mingw64\\bin\\gcc.exe
python3 -m nuitka --follow-imports --mingw64 __init__.py
In Linux:
python3 -m nuitka --follow-imports __init__.py
If you have Python version < 3.8 create binary with [pyinstaller](https://www.pyinstaller.org/):
pip3 install pyinstaller
pyinstaller __init__.py --onefile
Read [here](https://packaging.python.org/tutorials/packaging-projects/) about how to create packages for [pypi.org](https://pypi.org/):
python3 -m pip install --user --upgrade setuptools wheel twine
python3 setup.py sdist bdist_wheel
twine upload dist/*
# TODO
- Multiprocessing for tests.
- Correctly convert UNV surface set into INP surface.
- Use pyuff module