Giter Club home page Giter Club logo

unv2ccx's Introduction

© Ihor Mirzov, 2019-2023
Distributed under GNU General Public License v3.0

PyPi PyPi downloads
GitHub Github All Releases




Downloads | How to use | Screenshots | Your help | For developers | TODO




Salome to CalculiX converter (unv to inp)

Converts Salome .unv file to CalculiX .inp format.

This converter is based on Joël's Cugnoni UNV parser available with CalculiX Launcher 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 for list of tested UNV elements. All generated INP files are processed by CalculiX GraphiX and CalculiX Adanced Environment without any errors.

Thanks to Niclas Stenberg for fixing bug with empty sets.



How to use

Download Linux and Windows binaries from the releases page. 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:
UNV 2D Converted 1D and 2D elements in CalculiX GraphiX:
INP 2D

3D UNV elements in Salome:
UNV 3D Converted 3D elements in CalculiX GraphiX:
INP 3D



Your help

Please, you may:



For developers

PyPI pyversions Visual Studio Code

To run this converter from source you'll need Python 3.

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:

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:

pip3 install pyinstaller
pyinstaller __init__.py --onefile

Read here about how to create packages for 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
  • Support keyword *HEADING
  • Support keyword *SURFACE

unv2ccx's People

Contributors

imirzov avatar xnst avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

unv2ccx's Issues

Mesh with mixed element types cannot be converted

Hi there,

The converter has an issue that cannot convert the mesh with multi-types of elements. If a UNV file contains the beam elements and solid elements, as an example, the converter would produce nothing. I have attahced an example unv file.

I am wondering whether the convert can proceed the multi-type of elements model. Thanks!

Regards
ywan459
Compound_Mesh_1.zip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.