Skip to main content

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)、Gmsh mesh format(.msh)の読み書きに対応し、IDや物性番号などのメタデータのラウンドトリップ保存を重視しています。

特長

  • 対応フォーマット: ATLAS(メッシュ・ポスト)、UNV(メッシュ・ポスト)、Femap NEU(メッシュ・ポスト)、Gmsh MSH(メッシュ)
  • メタデータ保持: 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 mesh_sample.atl out.unv
ems-file-format-converter sample_mesh.unv out.atl
ems-file-format-converter model.neu model.msh --progress

形式を明示的に指定する場合:

ems-file-format-converter mesh_sample.dat out.unv --informat atl --outformat unv

ポストデータの読み書き(モード指定: 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
  • Gmsh: .msh

Python API(例)

from ems_file_format_converter import read_mesh, write_mesh

# 拡張子から形式を自動判別する統一API
mesh = read_mesh("sample/mesh_sample.atl")
write_mesh("out.neu", mesh)

# 大規模なFemap NEUでは読み込み進捗を表示可能
large_mesh = read_mesh("large_model.neu", progress=True)

from ems_file_format_converter import atlas
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-any wheel)は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 を参照してください。

Metadata

Release files for ems-file-format-converter 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ems-file-format-converter 0.6.0
File Size Uploaded
ems_file_format_converter-0.6.0.tar.gz 34.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ems-file-format-converter 0.6.0
File Interpreter ABI Platform
ems_file_format_converter-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 66.2 kB

Release files / ems_file_format_converter-0.6.0.tar.gz

Download URL ems_file_format_converter-0.6.0.tar.gz
Size 34.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9a866f8823066823834c693d4449926c4aa61c0a83d39552db6c95b5094ad23b
BLAKE2b-256 checksum
How to use checksums
966935c3904541466f185a05b7990a2082e05f3cb41b06c11f581c5f0cdf9073
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / ems_file_format_converter-0.6.0-py3-none-any.whl

Download URL ems_file_format_converter-0.6.0-py3-none-any.whl
Size 31.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c7f4a728704d980fc326ccaa29f4b792c0ecdb9c00c42891e5d4ced97e1d155
BLAKE2b-256 checksum
How to use checksums
bd8cc9e0d523e986b402c50ae3bab32aea4063066532bf8a4a841458424113f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.1

2 release files

0.5.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page