CAE file format converter (Femap neutral, I-DEAS UNV, ATLAS, ...)
Project description
EMS File Format Converter
このリポジトリは、CAE向けメッシュ/ポストデータの簡易コンバータです。サイエンスソリューションズ社(Science Solutions International Laboratory, Inc.; SSIL)の電磁界解析ソフトウェア「EMSolution」で用いるATLASテキストファイルフォーマット(.atl)、I‑DEAS Universal file format(.unv)、Femap Neutral file format(.neu)の読み書きに対応し、IDや物性番号などのメタデータのラウンドトリップ保存を重視しています。
特長
- 対応フォーマット: ATLAS(メッシュ・ポスト)、UNV(メッシュ・ポスト)、Femap NEU(メッシュ・ポスト)
- メタデータ保持: Node ID、Element ID、物性番号(
iprop)を可能な限り保持 - CLI: 単一のCLIから変換・ポスト入出力が可能
- ユニバーサルパッケージ: OS依存のネイティブ拡張を含まない pure Python パッケージ
- テスト/CI:
pytest完備、GitHub Actionsでubuntu-latest/windows-latestの手動CI実行に対応 - PyPI公開: GitHub Actionsから手動でPyPI公開可能
インストール
事前にPython 3.10以上が必要です。
PyPI からインストールできます。
pip install ems-file-format-converter
Releaseに添付したwhl(Wheel)ファイルからのインストール、またはローカルビルドも可能です。
# 例: ダウンロードしたWHLをインストール
pip install --force-reinstall path\to\ems_file_format_converter-0.1.0-py3-none-any.whl
# ソースからビルドしてWHL作成 → インストール
python -m build
pip install --force-reinstall dist/ems_file_format_converter-0.1.0-py3-none-any.whl
使い方(CLI)
メッシュ変換(入力は拡張子で自動判別、出力形式を指定):
ems-file-format-converter --in mesh_sample.atl --out out.unv
ems-file-format-converter --in sample_mesh.unv --out out.atl
ポストデータの読み書き(モード指定: components|scalar|vector|vector+scalar):
ems-file-format-converter --post-in post_sample.atl --post-out rt_post.atl --post-mode components
--post-mode の意味:
components(デフォルト): すべての成分(component1..N)をそのまま出力(部分的に切り捨てない)scalar: component1 のみ出力vector: component1..3 を出力(不足分は 0)vector+scalar: component1..4 を出力(不足分は 0)
対応拡張子:
- ATLAS:
.atl - UNV:
.unv - Femap Neutral:
.neu
Python API(例)
from ems_file_format_converter import atlas
mesh = atlas.read_mesh("sample/mesh_sample.atl")
atlas.write_mesh("out.atl", mesh)
steps = atlas.read_post("sample/post_sample.atl")
atlas.write_post("out_post.atl", steps, mode="components")
UNVやFemap NEUも同様に ems_file_format_converter.unv / ems_file_format_converter.femap のモジュールを利用できます。
テスト
pytest -q
GitHub Actions ワークフロー
GitHub Actions の CI and Publish ワークフローは手動実行専用です。push や pull_request では起動しません。
- GitHub の
ActionsタブからCI and Publishを選び、Run workflowを実行します。 - 通常のCI確認では
publish_to_pypiをfalseにします。 - この場合、
ubuntu-latestとwindows-latestの両方でテストとpython -m buildによるビルド確認を行います。 - 本パッケージはユニバーサルな pure Python パッケージのため、OSごとに別配布物を作るのではなく、互換性確認のために複数OSで検証しています。
- 配布物(
sdistとpy3-none-anywheel)はUbuntu上で1回だけ生成し、twine checkを実行します。
PyPI 公開
PyPI公開も同じワークフローから手動で行います。
- あらかじめ
v0.5.1のようなv*.*.*形式のGitタグを作成しておきます。 Run workflow実行時は通常どおりデフォルトブランチから起動します。publish_to_pypiをtrueにし、release_tagにv0.5.1のようなタグ名を入力して実行します。- ワークフローはそのタグをチェックアウトしてビルドし、ビルド済み配布物をPyPIへ公開します。
- 公開にはPyPI側で GitHub Actions Trusted Publishing の設定が必要です。
ライセンス
MITライセンスです。LICENSE を参照してください。
英語版README
英語版は README_en.md を参照してください。
Project details
Release history Release notifications | RSS feed
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 ems_file_format_converter-0.5.0.tar.gz.
File metadata
- Download URL: ems_file_format_converter-0.5.0.tar.gz
- Upload date:
- Size: 26.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b5c3af7738c910cf971e3fe3e936e491b42de66c320344a6b359f21e340acc5
|
|
| MD5 |
91cccff50bee57ba20d230cfd55a8db6
|
|
| BLAKE2b-256 |
ab4480f497ec70287c1960919c7257e234a5650f8aca2c83f38e5ad3794872e7
|
Provenance
The following attestation bundles were made for ems_file_format_converter-0.5.0.tar.gz:
Publisher:
cli.yml on EMSolution-SSIL/ems_file_format_converter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ems_file_format_converter-0.5.0.tar.gz -
Subject digest:
7b5c3af7738c910cf971e3fe3e936e491b42de66c320344a6b359f21e340acc5 - Sigstore transparency entry: 1566521307
- Sigstore integration time:
-
Permalink:
EMSolution-SSIL/ems_file_format_converter@5a1f803ff008e0fcc4660959c23335c352ab098e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/EMSolution-SSIL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cli.yml@5a1f803ff008e0fcc4660959c23335c352ab098e -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file ems_file_format_converter-0.5.0-py3-none-any.whl.
File metadata
- Download URL: ems_file_format_converter-0.5.0-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6176943500197468e7d10b8fbdadb96df9b3afe1a2f828a3c6674211bf1866d3
|
|
| MD5 |
3037256579040df9c4cf3ad2c247e445
|
|
| BLAKE2b-256 |
f45156ee75dcf2a519ec6e22557e19106ae21d922fc5fff4820575f133c34ad9
|
Provenance
The following attestation bundles were made for ems_file_format_converter-0.5.0-py3-none-any.whl:
Publisher:
cli.yml on EMSolution-SSIL/ems_file_format_converter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ems_file_format_converter-0.5.0-py3-none-any.whl -
Subject digest:
6176943500197468e7d10b8fbdadb96df9b3afe1a2f828a3c6674211bf1866d3 - Sigstore transparency entry: 1566521335
- Sigstore integration time:
-
Permalink:
EMSolution-SSIL/ems_file_format_converter@5a1f803ff008e0fcc4660959c23335c352ab098e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/EMSolution-SSIL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cli.yml@5a1f803ff008e0fcc4660959c23335c352ab098e -
Trigger Event:
workflow_dispatch
-
Statement type: