Coreform-Cubit-Mesh-Export 0.9.1__tar.gz → 0.9.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Coreform-Cubit-Mesh-Export might be problematic. Click here for more details.
- coreform_cubit_mesh_export-0.9.4/Coreform_Cubit_Mesh_Export.egg-info/PKG-INFO +161 -0
- {coreform_cubit_mesh_export-0.9.1 → coreform_cubit_mesh_export-0.9.4}/Coreform_Cubit_Mesh_Export.egg-info/SOURCES.txt +2 -2
- {coreform_cubit_mesh_export-0.9.1 → coreform_cubit_mesh_export-0.9.4}/Coreform_Cubit_Mesh_Export.egg-info/top_level.txt +2 -0
- coreform_cubit_mesh_export-0.9.4/PKG-INFO +161 -0
- coreform_cubit_mesh_export-0.9.4/README.md +132 -0
- {coreform_cubit_mesh_export-0.9.1 → coreform_cubit_mesh_export-0.9.4}/cubit_mesh_export.py +13 -9
- coreform_cubit_mesh_export-0.9.4/file_format/ngsolve_read_gmsh.py +218 -0
- {coreform_cubit_mesh_export-0.9.1 → coreform_cubit_mesh_export-0.9.4}/pyproject.toml +22 -4
- coreform_cubit_mesh_export-0.9.1/Coreform_Cubit_Mesh_Export.egg-info/PKG-INFO +0 -74
- coreform_cubit_mesh_export-0.9.1/PKG-INFO +0 -74
- coreform_cubit_mesh_export-0.9.1/README.md +0 -42
- coreform_cubit_mesh_export-0.9.1/setup.py +0 -59
- {coreform_cubit_mesh_export-0.9.1 → coreform_cubit_mesh_export-0.9.4}/Coreform_Cubit_Mesh_Export.egg-info/dependency_links.txt +0 -0
- {coreform_cubit_mesh_export-0.9.1 → coreform_cubit_mesh_export-0.9.4}/Coreform_Cubit_Mesh_Export.egg-info/requires.txt +0 -0
- {coreform_cubit_mesh_export-0.9.1 → coreform_cubit_mesh_export-0.9.4}/setup.cfg +0 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Coreform_Cubit_Mesh_Export
|
|
3
|
+
Version: 0.9.4
|
|
4
|
+
Summary: Cubit mesh export to various formats including Gmsh, Nastran, and VTK
|
|
5
|
+
Author-email: Kengo Sugahara <ksugahar@gmail.com>
|
|
6
|
+
Maintainer-email: Kengo Sugahara <ksugahar@gmail.com>
|
|
7
|
+
License: BSD-3-Clause
|
|
8
|
+
Project-URL: Homepage, https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
9
|
+
Project-URL: Repository, https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/ksugahar/Coreform_Cubit_Mesh_Export/issues
|
|
11
|
+
Keywords: cubit,mesh,gmsh,nastran,vtk,export,coreform
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
25
|
+
Requires-Python: >=3.7
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
Requires-Dist: numpy>=1.20.3
|
|
28
|
+
Requires-Dist: scipy>=1.6.3
|
|
29
|
+
|
|
30
|
+
# Coreform Cubit Mesh Export
|
|
31
|
+
|
|
32
|
+
Coreform Cubitから様々な形式のメッシュファイルをエクスポートするPythonライブラリ
|
|
33
|
+
|
|
34
|
+
## インストール方法
|
|
35
|
+
|
|
36
|
+
### PyPIから直接インストール(推奨)
|
|
37
|
+
```bash
|
|
38
|
+
pip install --upgrade coreform-cubit-mesh-export
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Cubit内蔵Pythonの場合
|
|
42
|
+
```bash
|
|
43
|
+
cd "C:\Program Files\Coreform Cubit 2025.3\bin\python3\"
|
|
44
|
+
python.exe -m pip install --upgrade coreform-cubit-mesh-export
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 開発版をGitHubからインストール
|
|
48
|
+
```bash
|
|
49
|
+
pip install git+https://github.com/ksugahar/Coreform_Cubit_Mesh_Export.git
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### ローカルインストール(開発用)
|
|
53
|
+
```bash
|
|
54
|
+
git clone https://github.com/ksugahar/Coreform_Cubit_Mesh_Export.git
|
|
55
|
+
cd Coreform_Cubit_Mesh_Export
|
|
56
|
+
pip install -e .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## サポートしているファイル形式
|
|
60
|
+
|
|
61
|
+
- **Gmsh形式**
|
|
62
|
+
- バージョン2.2(完全サポート)
|
|
63
|
+
- バージョン4.1(部分サポート)
|
|
64
|
+
- **Nastran形式**
|
|
65
|
+
- 2Dメッシュ
|
|
66
|
+
- 3Dメッシュ
|
|
67
|
+
- **MEG形式**(ELF用)
|
|
68
|
+
- 2Dメッシュ
|
|
69
|
+
- 3Dメッシュ
|
|
70
|
+
- **VTK形式**
|
|
71
|
+
- メッシュのみ(Legacy VTK形式)
|
|
72
|
+
|
|
73
|
+
## 使い方
|
|
74
|
+
|
|
75
|
+
### Cubit内での使用例
|
|
76
|
+
|
|
77
|
+
Cubitでメッシュ生成後、以下のようにPythonスクリプトを実行します:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
# Cubitコマンドライン
|
|
81
|
+
play "export_mesh.py"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`export_mesh.py`の内容例:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
import cubit_mesh_export
|
|
88
|
+
|
|
89
|
+
# Nastran形式でエクスポート
|
|
90
|
+
FileName = 'output/model.nas'
|
|
91
|
+
cubit_mesh_export.export_3D_Nastran(cubit, FileName)
|
|
92
|
+
|
|
93
|
+
# Gmsh形式でエクスポート
|
|
94
|
+
FileName = 'output/model.msh'
|
|
95
|
+
cubit_mesh_export.export_3D_gmsh_ver2(cubit, FileName)
|
|
96
|
+
|
|
97
|
+
# VTK形式でエクスポート
|
|
98
|
+
FileName = 'output/model.vtk'
|
|
99
|
+
cubit_mesh_export.export_3D_vtk(cubit, FileName)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## 関数一覧
|
|
103
|
+
|
|
104
|
+
### Gmsh形式
|
|
105
|
+
- `export_3D_gmsh_ver2(cubit, filename)` - Gmsh v2.2形式で3Dメッシュをエクスポート
|
|
106
|
+
- `export_3D_gmsh_ver4(cubit, filename)` - Gmsh v4.1形式で3Dメッシュをエクスポート(部分サポート)
|
|
107
|
+
|
|
108
|
+
### Nastran形式
|
|
109
|
+
- `export_2D_Nastran(cubit, filename)` - 2DメッシュをNastran形式でエクスポート
|
|
110
|
+
- `export_3D_Nastran(cubit, filename)` - 3DメッシュをNastran形式でエクスポート
|
|
111
|
+
|
|
112
|
+
### MEG形式(ELF用)
|
|
113
|
+
- `export_2D_meg(cubit, filename)` - 2DメッシュをMEG形式でエクスポート
|
|
114
|
+
- `export_3D_meg(cubit, filename)` - 3DメッシュをMEG形式でエクスポート
|
|
115
|
+
|
|
116
|
+
### VTK形式
|
|
117
|
+
- `export_3D_vtk(cubit, filename)` - 3DメッシュをVTK形式でエクスポート
|
|
118
|
+
|
|
119
|
+
## 要件
|
|
120
|
+
|
|
121
|
+
- Python 3.7以上
|
|
122
|
+
- NumPy >= 1.20.3
|
|
123
|
+
- SciPy >= 1.6.3
|
|
124
|
+
- Coreform Cubit(メッシュ生成用)
|
|
125
|
+
|
|
126
|
+
## ライセンス
|
|
127
|
+
|
|
128
|
+
BSD 3-Clause License
|
|
129
|
+
|
|
130
|
+
## 作者
|
|
131
|
+
|
|
132
|
+
Kengo Sugahara (ksugahar@gmail.com)
|
|
133
|
+
|
|
134
|
+
## リポジトリ
|
|
135
|
+
|
|
136
|
+
- GitHub: [https://github.com/ksugahar/Coreform_Cubit_Mesh_Export](https://github.com/ksugahar/Coreform_Cubit_Mesh_Export)
|
|
137
|
+
- PyPI: [https://pypi.org/project/coreform-cubit-mesh-export/](https://pypi.org/project/coreform-cubit-mesh-export/)
|
|
138
|
+
|
|
139
|
+
## バグ報告・機能要望
|
|
140
|
+
|
|
141
|
+
[GitHub Issues](https://github.com/ksugahar/Coreform_Cubit_Mesh_Export/issues)にてお願いします。
|
|
142
|
+
|
|
143
|
+
## 変更履歴
|
|
144
|
+
|
|
145
|
+
### v0.9.4 (2025-09-11)
|
|
146
|
+
- **バグ修正**
|
|
147
|
+
- Gmsh v4形式: Wedge要素のノード出力を4個から6個に修正
|
|
148
|
+
- Gmsh v4形式: 要素タグを0ではなく1から開始するよう修正
|
|
149
|
+
- Gmsh v4形式: 空の要素リストでmin/max関数がエラーになる問題を修正
|
|
150
|
+
- VTK形式: WedgeとPyramid要素のconnectivity取得処理が欠落していた問題を修正
|
|
151
|
+
- NASTRAN形式: f-string構文エラーを修正
|
|
152
|
+
- FreeFEM形式: 未定義変数`nodeset_surface_list`の問題を修正
|
|
153
|
+
- geo_mesh形式: 未定義変数`nodes`の初期化を追加
|
|
154
|
+
|
|
155
|
+
### v0.9.3 (2025-01)
|
|
156
|
+
- パッケージ名を`Coreform_Cubit_Mesh_Export`に統一
|
|
157
|
+
- `pyproject.toml`ベースの最新パッケージング方式に移行
|
|
158
|
+
- ドキュメントの改善
|
|
159
|
+
|
|
160
|
+
### v0.9.2
|
|
161
|
+
- 初回PyPIリリース
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
README.md
|
|
2
2
|
cubit_mesh_export.py
|
|
3
3
|
pyproject.toml
|
|
4
|
-
setup.py
|
|
5
4
|
Coreform_Cubit_Mesh_Export.egg-info/PKG-INFO
|
|
6
5
|
Coreform_Cubit_Mesh_Export.egg-info/SOURCES.txt
|
|
7
6
|
Coreform_Cubit_Mesh_Export.egg-info/dependency_links.txt
|
|
8
7
|
Coreform_Cubit_Mesh_Export.egg-info/requires.txt
|
|
9
|
-
Coreform_Cubit_Mesh_Export.egg-info/top_level.txt
|
|
8
|
+
Coreform_Cubit_Mesh_Export.egg-info/top_level.txt
|
|
9
|
+
file_format/ngsolve_read_gmsh.py
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Coreform_Cubit_Mesh_Export
|
|
3
|
+
Version: 0.9.4
|
|
4
|
+
Summary: Cubit mesh export to various formats including Gmsh, Nastran, and VTK
|
|
5
|
+
Author-email: Kengo Sugahara <ksugahar@gmail.com>
|
|
6
|
+
Maintainer-email: Kengo Sugahara <ksugahar@gmail.com>
|
|
7
|
+
License: BSD-3-Clause
|
|
8
|
+
Project-URL: Homepage, https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
9
|
+
Project-URL: Repository, https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/ksugahar/Coreform_Cubit_Mesh_Export/issues
|
|
11
|
+
Keywords: cubit,mesh,gmsh,nastran,vtk,export,coreform
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
25
|
+
Requires-Python: >=3.7
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
Requires-Dist: numpy>=1.20.3
|
|
28
|
+
Requires-Dist: scipy>=1.6.3
|
|
29
|
+
|
|
30
|
+
# Coreform Cubit Mesh Export
|
|
31
|
+
|
|
32
|
+
Coreform Cubitから様々な形式のメッシュファイルをエクスポートするPythonライブラリ
|
|
33
|
+
|
|
34
|
+
## インストール方法
|
|
35
|
+
|
|
36
|
+
### PyPIから直接インストール(推奨)
|
|
37
|
+
```bash
|
|
38
|
+
pip install --upgrade coreform-cubit-mesh-export
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Cubit内蔵Pythonの場合
|
|
42
|
+
```bash
|
|
43
|
+
cd "C:\Program Files\Coreform Cubit 2025.3\bin\python3\"
|
|
44
|
+
python.exe -m pip install --upgrade coreform-cubit-mesh-export
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 開発版をGitHubからインストール
|
|
48
|
+
```bash
|
|
49
|
+
pip install git+https://github.com/ksugahar/Coreform_Cubit_Mesh_Export.git
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### ローカルインストール(開発用)
|
|
53
|
+
```bash
|
|
54
|
+
git clone https://github.com/ksugahar/Coreform_Cubit_Mesh_Export.git
|
|
55
|
+
cd Coreform_Cubit_Mesh_Export
|
|
56
|
+
pip install -e .
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## サポートしているファイル形式
|
|
60
|
+
|
|
61
|
+
- **Gmsh形式**
|
|
62
|
+
- バージョン2.2(完全サポート)
|
|
63
|
+
- バージョン4.1(部分サポート)
|
|
64
|
+
- **Nastran形式**
|
|
65
|
+
- 2Dメッシュ
|
|
66
|
+
- 3Dメッシュ
|
|
67
|
+
- **MEG形式**(ELF用)
|
|
68
|
+
- 2Dメッシュ
|
|
69
|
+
- 3Dメッシュ
|
|
70
|
+
- **VTK形式**
|
|
71
|
+
- メッシュのみ(Legacy VTK形式)
|
|
72
|
+
|
|
73
|
+
## 使い方
|
|
74
|
+
|
|
75
|
+
### Cubit内での使用例
|
|
76
|
+
|
|
77
|
+
Cubitでメッシュ生成後、以下のようにPythonスクリプトを実行します:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
# Cubitコマンドライン
|
|
81
|
+
play "export_mesh.py"
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
`export_mesh.py`の内容例:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
import cubit_mesh_export
|
|
88
|
+
|
|
89
|
+
# Nastran形式でエクスポート
|
|
90
|
+
FileName = 'output/model.nas'
|
|
91
|
+
cubit_mesh_export.export_3D_Nastran(cubit, FileName)
|
|
92
|
+
|
|
93
|
+
# Gmsh形式でエクスポート
|
|
94
|
+
FileName = 'output/model.msh'
|
|
95
|
+
cubit_mesh_export.export_3D_gmsh_ver2(cubit, FileName)
|
|
96
|
+
|
|
97
|
+
# VTK形式でエクスポート
|
|
98
|
+
FileName = 'output/model.vtk'
|
|
99
|
+
cubit_mesh_export.export_3D_vtk(cubit, FileName)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## 関数一覧
|
|
103
|
+
|
|
104
|
+
### Gmsh形式
|
|
105
|
+
- `export_3D_gmsh_ver2(cubit, filename)` - Gmsh v2.2形式で3Dメッシュをエクスポート
|
|
106
|
+
- `export_3D_gmsh_ver4(cubit, filename)` - Gmsh v4.1形式で3Dメッシュをエクスポート(部分サポート)
|
|
107
|
+
|
|
108
|
+
### Nastran形式
|
|
109
|
+
- `export_2D_Nastran(cubit, filename)` - 2DメッシュをNastran形式でエクスポート
|
|
110
|
+
- `export_3D_Nastran(cubit, filename)` - 3DメッシュをNastran形式でエクスポート
|
|
111
|
+
|
|
112
|
+
### MEG形式(ELF用)
|
|
113
|
+
- `export_2D_meg(cubit, filename)` - 2DメッシュをMEG形式でエクスポート
|
|
114
|
+
- `export_3D_meg(cubit, filename)` - 3DメッシュをMEG形式でエクスポート
|
|
115
|
+
|
|
116
|
+
### VTK形式
|
|
117
|
+
- `export_3D_vtk(cubit, filename)` - 3DメッシュをVTK形式でエクスポート
|
|
118
|
+
|
|
119
|
+
## 要件
|
|
120
|
+
|
|
121
|
+
- Python 3.7以上
|
|
122
|
+
- NumPy >= 1.20.3
|
|
123
|
+
- SciPy >= 1.6.3
|
|
124
|
+
- Coreform Cubit(メッシュ生成用)
|
|
125
|
+
|
|
126
|
+
## ライセンス
|
|
127
|
+
|
|
128
|
+
BSD 3-Clause License
|
|
129
|
+
|
|
130
|
+
## 作者
|
|
131
|
+
|
|
132
|
+
Kengo Sugahara (ksugahar@gmail.com)
|
|
133
|
+
|
|
134
|
+
## リポジトリ
|
|
135
|
+
|
|
136
|
+
- GitHub: [https://github.com/ksugahar/Coreform_Cubit_Mesh_Export](https://github.com/ksugahar/Coreform_Cubit_Mesh_Export)
|
|
137
|
+
- PyPI: [https://pypi.org/project/coreform-cubit-mesh-export/](https://pypi.org/project/coreform-cubit-mesh-export/)
|
|
138
|
+
|
|
139
|
+
## バグ報告・機能要望
|
|
140
|
+
|
|
141
|
+
[GitHub Issues](https://github.com/ksugahar/Coreform_Cubit_Mesh_Export/issues)にてお願いします。
|
|
142
|
+
|
|
143
|
+
## 変更履歴
|
|
144
|
+
|
|
145
|
+
### v0.9.4 (2025-09-11)
|
|
146
|
+
- **バグ修正**
|
|
147
|
+
- Gmsh v4形式: Wedge要素のノード出力を4個から6個に修正
|
|
148
|
+
- Gmsh v4形式: 要素タグを0ではなく1から開始するよう修正
|
|
149
|
+
- Gmsh v4形式: 空の要素リストでmin/max関数がエラーになる問題を修正
|
|
150
|
+
- VTK形式: WedgeとPyramid要素のconnectivity取得処理が欠落していた問題を修正
|
|
151
|
+
- NASTRAN形式: f-string構文エラーを修正
|
|
152
|
+
- FreeFEM形式: 未定義変数`nodeset_surface_list`の問題を修正
|
|
153
|
+
- geo_mesh形式: 未定義変数`nodes`の初期化を追加
|
|
154
|
+
|
|
155
|
+
### v0.9.3 (2025-01)
|
|
156
|
+
- パッケージ名を`Coreform_Cubit_Mesh_Export`に統一
|
|
157
|
+
- `pyproject.toml`ベースの最新パッケージング方式に移行
|
|
158
|
+
- ドキュメントの改善
|
|
159
|
+
|
|
160
|
+
### v0.9.2
|
|
161
|
+
- 初回PyPIリリース
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
# Coreform Cubit Mesh Export
|
|
2
|
+
|
|
3
|
+
Coreform Cubitから様々な形式のメッシュファイルをエクスポートするPythonライブラリ
|
|
4
|
+
|
|
5
|
+
## インストール方法
|
|
6
|
+
|
|
7
|
+
### PyPIから直接インストール(推奨)
|
|
8
|
+
```bash
|
|
9
|
+
pip install --upgrade coreform-cubit-mesh-export
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### Cubit内蔵Pythonの場合
|
|
13
|
+
```bash
|
|
14
|
+
cd "C:\Program Files\Coreform Cubit 2025.3\bin\python3\"
|
|
15
|
+
python.exe -m pip install --upgrade coreform-cubit-mesh-export
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### 開発版をGitHubからインストール
|
|
19
|
+
```bash
|
|
20
|
+
pip install git+https://github.com/ksugahar/Coreform_Cubit_Mesh_Export.git
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### ローカルインストール(開発用)
|
|
24
|
+
```bash
|
|
25
|
+
git clone https://github.com/ksugahar/Coreform_Cubit_Mesh_Export.git
|
|
26
|
+
cd Coreform_Cubit_Mesh_Export
|
|
27
|
+
pip install -e .
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## サポートしているファイル形式
|
|
31
|
+
|
|
32
|
+
- **Gmsh形式**
|
|
33
|
+
- バージョン2.2(完全サポート)
|
|
34
|
+
- バージョン4.1(部分サポート)
|
|
35
|
+
- **Nastran形式**
|
|
36
|
+
- 2Dメッシュ
|
|
37
|
+
- 3Dメッシュ
|
|
38
|
+
- **MEG形式**(ELF用)
|
|
39
|
+
- 2Dメッシュ
|
|
40
|
+
- 3Dメッシュ
|
|
41
|
+
- **VTK形式**
|
|
42
|
+
- メッシュのみ(Legacy VTK形式)
|
|
43
|
+
|
|
44
|
+
## 使い方
|
|
45
|
+
|
|
46
|
+
### Cubit内での使用例
|
|
47
|
+
|
|
48
|
+
Cubitでメッシュ生成後、以下のようにPythonスクリプトを実行します:
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
# Cubitコマンドライン
|
|
52
|
+
play "export_mesh.py"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`export_mesh.py`の内容例:
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
import cubit_mesh_export
|
|
59
|
+
|
|
60
|
+
# Nastran形式でエクスポート
|
|
61
|
+
FileName = 'output/model.nas'
|
|
62
|
+
cubit_mesh_export.export_3D_Nastran(cubit, FileName)
|
|
63
|
+
|
|
64
|
+
# Gmsh形式でエクスポート
|
|
65
|
+
FileName = 'output/model.msh'
|
|
66
|
+
cubit_mesh_export.export_3D_gmsh_ver2(cubit, FileName)
|
|
67
|
+
|
|
68
|
+
# VTK形式でエクスポート
|
|
69
|
+
FileName = 'output/model.vtk'
|
|
70
|
+
cubit_mesh_export.export_3D_vtk(cubit, FileName)
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## 関数一覧
|
|
74
|
+
|
|
75
|
+
### Gmsh形式
|
|
76
|
+
- `export_3D_gmsh_ver2(cubit, filename)` - Gmsh v2.2形式で3Dメッシュをエクスポート
|
|
77
|
+
- `export_3D_gmsh_ver4(cubit, filename)` - Gmsh v4.1形式で3Dメッシュをエクスポート(部分サポート)
|
|
78
|
+
|
|
79
|
+
### Nastran形式
|
|
80
|
+
- `export_2D_Nastran(cubit, filename)` - 2DメッシュをNastran形式でエクスポート
|
|
81
|
+
- `export_3D_Nastran(cubit, filename)` - 3DメッシュをNastran形式でエクスポート
|
|
82
|
+
|
|
83
|
+
### MEG形式(ELF用)
|
|
84
|
+
- `export_2D_meg(cubit, filename)` - 2DメッシュをMEG形式でエクスポート
|
|
85
|
+
- `export_3D_meg(cubit, filename)` - 3DメッシュをMEG形式でエクスポート
|
|
86
|
+
|
|
87
|
+
### VTK形式
|
|
88
|
+
- `export_3D_vtk(cubit, filename)` - 3DメッシュをVTK形式でエクスポート
|
|
89
|
+
|
|
90
|
+
## 要件
|
|
91
|
+
|
|
92
|
+
- Python 3.7以上
|
|
93
|
+
- NumPy >= 1.20.3
|
|
94
|
+
- SciPy >= 1.6.3
|
|
95
|
+
- Coreform Cubit(メッシュ生成用)
|
|
96
|
+
|
|
97
|
+
## ライセンス
|
|
98
|
+
|
|
99
|
+
BSD 3-Clause License
|
|
100
|
+
|
|
101
|
+
## 作者
|
|
102
|
+
|
|
103
|
+
Kengo Sugahara (ksugahar@gmail.com)
|
|
104
|
+
|
|
105
|
+
## リポジトリ
|
|
106
|
+
|
|
107
|
+
- GitHub: [https://github.com/ksugahar/Coreform_Cubit_Mesh_Export](https://github.com/ksugahar/Coreform_Cubit_Mesh_Export)
|
|
108
|
+
- PyPI: [https://pypi.org/project/coreform-cubit-mesh-export/](https://pypi.org/project/coreform-cubit-mesh-export/)
|
|
109
|
+
|
|
110
|
+
## バグ報告・機能要望
|
|
111
|
+
|
|
112
|
+
[GitHub Issues](https://github.com/ksugahar/Coreform_Cubit_Mesh_Export/issues)にてお願いします。
|
|
113
|
+
|
|
114
|
+
## 変更履歴
|
|
115
|
+
|
|
116
|
+
### v0.9.4 (2025-09-11)
|
|
117
|
+
- **バグ修正**
|
|
118
|
+
- Gmsh v4形式: Wedge要素のノード出力を4個から6個に修正
|
|
119
|
+
- Gmsh v4形式: 要素タグを0ではなく1から開始するよう修正
|
|
120
|
+
- Gmsh v4形式: 空の要素リストでmin/max関数がエラーになる問題を修正
|
|
121
|
+
- VTK形式: WedgeとPyramid要素のconnectivity取得処理が欠落していた問題を修正
|
|
122
|
+
- NASTRAN形式: f-string構文エラーを修正
|
|
123
|
+
- FreeFEM形式: 未定義変数`nodeset_surface_list`の問題を修正
|
|
124
|
+
- geo_mesh形式: 未定義変数`nodes`の初期化を追加
|
|
125
|
+
|
|
126
|
+
### v0.9.3 (2025-01)
|
|
127
|
+
- パッケージ名を`Coreform_Cubit_Mesh_Export`に統一
|
|
128
|
+
- `pyproject.toml`ベースの最新パッケージング方式に移行
|
|
129
|
+
- ドキュメントの改善
|
|
130
|
+
|
|
131
|
+
### v0.9.2
|
|
132
|
+
- 初回PyPIリリース
|
|
@@ -64,14 +64,12 @@ def export_3D_mesh(cubit, FileName):
|
|
|
64
64
|
for nodeset_id in nodeset_list:
|
|
65
65
|
surface_list = cubit.get_nodeset_surfaces(nodeset_id)
|
|
66
66
|
for surface_id in surface_list:
|
|
67
|
+
nodeset_surface_list.append(surface_id)
|
|
67
68
|
tri_list = cubit.get_surface_tris(surface_id)
|
|
68
69
|
if len(tri_list)>0:
|
|
69
70
|
for tri_id in tri_list:
|
|
70
71
|
node_list = cubit.get_connectivity("tri", tri_id)
|
|
71
72
|
fid.write(f'{node_list[0]} {node_list[1]} {node_list[2]} {nodeset_id}\n')
|
|
72
|
-
for surface_id in nodeset_surface_list:
|
|
73
|
-
quad_list += cubit.get_surface_quads(surface_id)
|
|
74
|
-
tri_list += cubit.get_surface_tris(surface_id)
|
|
75
73
|
|
|
76
74
|
fid.write("\n")
|
|
77
75
|
fid.write("End\n")
|
|
@@ -482,10 +480,13 @@ def export_3D_gmsh_ver4(cubit, FileName):
|
|
|
482
480
|
hex_all_list += cubit.get_volume_hexes(volume_id)
|
|
483
481
|
wedge_all_list += cubit.get_volume_wedges(volume_id)
|
|
484
482
|
|
|
485
|
-
elementTag =
|
|
483
|
+
elementTag = 1
|
|
486
484
|
|
|
487
485
|
all_list = quad_all_list + tri_all_list + hex_all_list + tet_all_list + wedge_all_list
|
|
488
|
-
|
|
486
|
+
if len(all_list) > 0:
|
|
487
|
+
fid.write(f'{ nodeset_surface_count + block_volume_count} {len(all_list)} {min(all_list)} {max(all_list)}\n')
|
|
488
|
+
else:
|
|
489
|
+
fid.write(f'{ nodeset_surface_count + block_volume_count} 0 0 0\n')
|
|
489
490
|
|
|
490
491
|
for nodeset_id in cubit.get_nodeset_id_list():
|
|
491
492
|
surface_list = cubit.get_nodeset_surfaces(nodeset_id)
|
|
@@ -530,7 +531,7 @@ def export_3D_gmsh_ver4(cubit, FileName):
|
|
|
530
531
|
for wedge_id in wedge_list:
|
|
531
532
|
node_list = cubit.get_connectivity("wedge", wedge_id)
|
|
532
533
|
elementTag +=1
|
|
533
|
-
fid.write(f'{elementTag} {node_list[0]} {node_list[1]} {node_list[2]} {node_list[3]}\n')
|
|
534
|
+
fid.write(f'{elementTag} {node_list[0]} {node_list[1]} {node_list[2]} {node_list[3]} {node_list[4]} {node_list[5]}\n')
|
|
534
535
|
|
|
535
536
|
fid.write('$EndElements\n')
|
|
536
537
|
fid.close()
|
|
@@ -549,7 +550,7 @@ def export_1D_Nastran(cubit, FileName):
|
|
|
549
550
|
fid.write("$\n")
|
|
550
551
|
fid.write("$ CUBIT NX Nastran Translator\n")
|
|
551
552
|
fid.write("$\n")
|
|
552
|
-
fid.write("
|
|
553
|
+
fid.write(f"$ File: {FileName}\n")
|
|
553
554
|
fid.write(f"$ Time Stamp: {formatted_date_time}\n")
|
|
554
555
|
fid.write("$\n")
|
|
555
556
|
fid.write("$\n")
|
|
@@ -645,7 +646,7 @@ def export_2D_Nastran(cubit, FileName):
|
|
|
645
646
|
fid.write("$\n")
|
|
646
647
|
fid.write("$ CUBIT NX Nastran Translator\n")
|
|
647
648
|
fid.write("$\n")
|
|
648
|
-
fid.write("
|
|
649
|
+
fid.write(f"$ File: {FileName}\n")
|
|
649
650
|
fid.write(f"$ Time Stamp: {formatted_date_time}\n")
|
|
650
651
|
fid.write("$\n")
|
|
651
652
|
fid.write("$\n")
|
|
@@ -756,7 +757,7 @@ def export_3D_Nastran(cubit, FileName, Pyram=True):
|
|
|
756
757
|
fid.write("$\n")
|
|
757
758
|
fid.write("$ CUBIT NX Nastran Translator\n")
|
|
758
759
|
fid.write("$\n")
|
|
759
|
-
fid.write("
|
|
760
|
+
fid.write(f"$ File: {FileName}\n")
|
|
760
761
|
fid.write(f"$ Time Stamp: {formatted_date_time}\n")
|
|
761
762
|
fid.write("$\n")
|
|
762
763
|
fid.write("$\n")
|
|
@@ -1197,8 +1198,10 @@ def export_3D_vtk(cubit, FileName):
|
|
|
1197
1198
|
node_list = cubit.get_connectivity("hex", hex_id)
|
|
1198
1199
|
fid.write(f'8 {node_list[0]-1} {node_list[1]-1} {node_list[2]-1} {node_list[3]-1} {node_list[4]-1} {node_list[5]-1} {node_list[6]-1} {node_list[7]-1}\n')
|
|
1199
1200
|
for wedge_id in wedge_list:
|
|
1201
|
+
node_list = cubit.get_connectivity("wedge", wedge_id)
|
|
1200
1202
|
fid.write(f'6 {node_list[0]-1} {node_list[1]-1} {node_list[2]-1} {node_list[3]-1} {node_list[4]-1} {node_list[5]-1} \n')
|
|
1201
1203
|
for pyramid_id in pyramid_list:
|
|
1204
|
+
node_list = cubit.get_connectivity("pyramid", pyramid_id)
|
|
1202
1205
|
fid.write(f'5 {node_list[0]-1} {node_list[1]-1} {node_list[2]-1} {node_list[3]-1} {node_list[4]-1} \n')
|
|
1203
1206
|
|
|
1204
1207
|
fid.write(f'CELL_TYPES {len(tet_list) + len(hex_list) + len(wedge_list) + len(pyramid_list)}\n')
|
|
@@ -1227,6 +1230,7 @@ def export_2D_geo_mesh(cubit, FileName):
|
|
|
1227
1230
|
import numpy
|
|
1228
1231
|
import scipy.io
|
|
1229
1232
|
|
|
1233
|
+
nodes = []
|
|
1230
1234
|
node_list = []
|
|
1231
1235
|
|
|
1232
1236
|
N = cubit.get_node_count()
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
from netgen.meshing import *
|
|
2
|
+
|
|
3
|
+
def ReadGmsh(filename):
|
|
4
|
+
if not filename.endswith(".msh"):
|
|
5
|
+
filename += ".msh"
|
|
6
|
+
meshdim = 1
|
|
7
|
+
with open(filename, 'r') as f:
|
|
8
|
+
while f.readline().split()[0] != "$Elements":
|
|
9
|
+
pass
|
|
10
|
+
nelem = int(f.readline())
|
|
11
|
+
for i in range(nelem):
|
|
12
|
+
line = f.readline()
|
|
13
|
+
eltype = int(line.split()[1])
|
|
14
|
+
if eltype > 1 and eltype != 15:
|
|
15
|
+
meshdim = 2
|
|
16
|
+
if eltype > 3 and eltype != 15:
|
|
17
|
+
meshdim = 3
|
|
18
|
+
break
|
|
19
|
+
|
|
20
|
+
f = open(filename, 'r')
|
|
21
|
+
mesh = Mesh(dim=meshdim)
|
|
22
|
+
|
|
23
|
+
pointmap = {}
|
|
24
|
+
facedescriptormap = {}
|
|
25
|
+
namemap = { 0 : { 0 : "default" },
|
|
26
|
+
1: { 0 : "default" },
|
|
27
|
+
2: { 0 : "default" },
|
|
28
|
+
3: { 0 : "default" } }
|
|
29
|
+
materialmap = {}
|
|
30
|
+
bbcmap = {}
|
|
31
|
+
|
|
32
|
+
segm = 1
|
|
33
|
+
trig = 2
|
|
34
|
+
quad = 3
|
|
35
|
+
tet = 4
|
|
36
|
+
hex = 5
|
|
37
|
+
prism = 6
|
|
38
|
+
pyramid = 7
|
|
39
|
+
segm3 = 8 # 2nd order line
|
|
40
|
+
trig6 = 9 # 2nd order trig
|
|
41
|
+
tet10 = 11 # 2nd order tet
|
|
42
|
+
point = 15
|
|
43
|
+
quad8 = 16 # 2nd order quad
|
|
44
|
+
hex20 = 17 # 2nd order hex
|
|
45
|
+
prism15 = 18 # 2nd order prism
|
|
46
|
+
pyramid13 = 19 # 2nd order pyramid
|
|
47
|
+
segms = [segm, segm3]
|
|
48
|
+
trigs = [trig, trig6]
|
|
49
|
+
quads = [quad, quad8]
|
|
50
|
+
tets = [tet, tet10]
|
|
51
|
+
hexes = [hex, hex20]
|
|
52
|
+
prisms = [prism, prism15]
|
|
53
|
+
pyramids = [pyramid, pyramid13]
|
|
54
|
+
elem0d = [point]
|
|
55
|
+
elem1d = segms
|
|
56
|
+
elem2d = trigs + quads
|
|
57
|
+
elem3d = tets + hexes + prisms + pyramids
|
|
58
|
+
|
|
59
|
+
num_nodes_map = { segm : 2,
|
|
60
|
+
trig : 3,
|
|
61
|
+
quad : 4,
|
|
62
|
+
tet : 4,
|
|
63
|
+
hex : 8,
|
|
64
|
+
prism : 6,
|
|
65
|
+
pyramid : 5,
|
|
66
|
+
segm3 : 3,
|
|
67
|
+
trig6 : 6,
|
|
68
|
+
tet10 : 10,
|
|
69
|
+
point : 1,
|
|
70
|
+
quad8 : 8,
|
|
71
|
+
hex20 : 20,
|
|
72
|
+
prism15 : 18,
|
|
73
|
+
pyramid13 : 19 }
|
|
74
|
+
|
|
75
|
+
while True:
|
|
76
|
+
line = f.readline()
|
|
77
|
+
if line == "":
|
|
78
|
+
break
|
|
79
|
+
|
|
80
|
+
if line.split()[0] == "$PhysicalNames":
|
|
81
|
+
print('WARNING: Physical groups detected - Be sure to define them for every geometrical entity.')
|
|
82
|
+
numnames = int(f.readline())
|
|
83
|
+
for i in range(numnames):
|
|
84
|
+
f.readline
|
|
85
|
+
line = f.readline()
|
|
86
|
+
namemap[int(line.split()[0])][int(line.split()[1])] = line.split()[2][1:-1]
|
|
87
|
+
|
|
88
|
+
if line.split()[0] == "$Nodes":
|
|
89
|
+
num = int(f.readline().split()[0])
|
|
90
|
+
for i in range(num):
|
|
91
|
+
line = f.readline()
|
|
92
|
+
nodenum, x, y, z = line.split()[0:4]
|
|
93
|
+
!!! pnum = mesh.Add(MeshPoint(Pnt(float(x), float(y), float(z))))
|
|
94
|
+
pointmap[int(nodenum)] = pnum
|
|
95
|
+
|
|
96
|
+
if line.split()[0] == "$Elements":
|
|
97
|
+
num = int(f.readline().split()[0])
|
|
98
|
+
|
|
99
|
+
for i in range(num):
|
|
100
|
+
line = f.readline().split()
|
|
101
|
+
elmnum = int(line[0])
|
|
102
|
+
elmtype = int(line[1])
|
|
103
|
+
numtags = int(line[2])
|
|
104
|
+
# the first tag is the physical group nr, the second tag is the group nr of the dim
|
|
105
|
+
tags = [int(line[3 + k]) for k in range(numtags)]
|
|
106
|
+
|
|
107
|
+
if elmtype not in num_nodes_map:
|
|
108
|
+
raise Exception("element type", elmtype, "not implemented")
|
|
109
|
+
num_nodes = num_nodes_map[elmtype]
|
|
110
|
+
|
|
111
|
+
nodenums = line[3 + numtags:3 + numtags + num_nodes]
|
|
112
|
+
nodenums2 = [pointmap[int(nn)] for nn in nodenums]
|
|
113
|
+
|
|
114
|
+
if elmtype in elem1d:
|
|
115
|
+
if meshdim == 3:
|
|
116
|
+
if tags[1] in bbcmap:
|
|
117
|
+
index = bbcmap[tags[1]]
|
|
118
|
+
else:
|
|
119
|
+
index = len(bbcmap) + 1
|
|
120
|
+
if len(namemap):
|
|
121
|
+
!!! mesh.SetCD2Name(index, namemap[1][tags[0]])
|
|
122
|
+
else:
|
|
123
|
+
!!! mesh.SetCD2Name(index, "line" + str(tags[1]))
|
|
124
|
+
bbcmap[tags[1]] = index
|
|
125
|
+
|
|
126
|
+
elif meshdim == 2:
|
|
127
|
+
if tags[1] in facedescriptormap.keys():
|
|
128
|
+
index = facedescriptormap[tags[1]]
|
|
129
|
+
else:
|
|
130
|
+
index = len(facedescriptormap) + 1
|
|
131
|
+
!!! fd = FaceDescriptor(bc=index)
|
|
132
|
+
if len(namemap):
|
|
133
|
+
!!! fd.bcname = namemap[1][tags[0]]
|
|
134
|
+
else:
|
|
135
|
+
fd.bcname = 'line' + str(tags[1])
|
|
136
|
+
!!! mesh.SetBCName(index - 1, fd.bcname)
|
|
137
|
+
!!! mesh.Add(fd)
|
|
138
|
+
facedescriptormap[tags[1]] = index
|
|
139
|
+
else:
|
|
140
|
+
if tags[1] in materialmap:
|
|
141
|
+
index = materialmap[tags[1]]
|
|
142
|
+
else:
|
|
143
|
+
index = len(materialmap) + 1
|
|
144
|
+
if len(namemap):
|
|
145
|
+
!!! mesh.SetMaterial(index, namemap[1][tags[0]])
|
|
146
|
+
else:
|
|
147
|
+
!!! mesh.SetMaterial(index, "line" + str(tags[1]))
|
|
148
|
+
materialmap[tags[1]] = index
|
|
149
|
+
|
|
150
|
+
!!! mesh.Add(Element1D(index=index, vertices=nodenums2))
|
|
151
|
+
|
|
152
|
+
if elmtype in elem2d: # 2d elements
|
|
153
|
+
if meshdim == 3:
|
|
154
|
+
if tags[1] in facedescriptormap.keys():
|
|
155
|
+
index = facedescriptormap[tags[1]]
|
|
156
|
+
else:
|
|
157
|
+
index = len(facedescriptormap) + 1
|
|
158
|
+
fd = FaceDescriptor(bc=index)
|
|
159
|
+
if len(namemap):
|
|
160
|
+
!!! fd.bcname = namemap[2][tags[0]]
|
|
161
|
+
else:
|
|
162
|
+
!!! fd.bcname = "surf" + str(tags[1])
|
|
163
|
+
!!! mesh.SetBCName(index - 1, fd.bcname)
|
|
164
|
+
!!! mesh.Add(fd)
|
|
165
|
+
facedescriptormap[tags[1]] = index
|
|
166
|
+
else:
|
|
167
|
+
if tags[1] in materialmap:
|
|
168
|
+
index = materialmap[tags[1]]
|
|
169
|
+
else:
|
|
170
|
+
index = len(materialmap) + 1
|
|
171
|
+
if len(namemap):
|
|
172
|
+
!!! mesh.SetMaterial(index, namemap[2][tags[0]])
|
|
173
|
+
else:
|
|
174
|
+
!!! mesh.SetMaterial(index, "surf" + str(tags[1]))
|
|
175
|
+
materialmap[tags[1]] = index
|
|
176
|
+
|
|
177
|
+
if elmtype in trigs:
|
|
178
|
+
ordering = [i for i in range(3)]
|
|
179
|
+
if elmtype == trig6:
|
|
180
|
+
!! ordering += [4,5,3]
|
|
181
|
+
if elmtype in quads:
|
|
182
|
+
ordering = [i for i in range(4)]
|
|
183
|
+
if elmtype == quad8:
|
|
184
|
+
!! ordering += [4, 6, 7, 5]
|
|
185
|
+
!!! mesh.Add(Element2D(index, [nodenums2[i] for i in ordering]))
|
|
186
|
+
|
|
187
|
+
if elmtype in elem3d: # volume elements
|
|
188
|
+
if tags[1] in materialmap:
|
|
189
|
+
index = materialmap[tags[1]]
|
|
190
|
+
else:
|
|
191
|
+
index = len(materialmap) + 1
|
|
192
|
+
if len(namemap):
|
|
193
|
+
!!! mesh.SetMaterial(index, namemap[3][tags[0]])
|
|
194
|
+
else:
|
|
195
|
+
!!! mesh.SetMaterial(index, "vol" + str(tags[1]))
|
|
196
|
+
materialmap[tags[1]] = index
|
|
197
|
+
|
|
198
|
+
nodenums2 = [pointmap[int(nn)] for nn in nodenums]
|
|
199
|
+
|
|
200
|
+
if elmtype in tets:
|
|
201
|
+
!! ordering = [0,1,2,3]
|
|
202
|
+
if elmtype == tet10:
|
|
203
|
+
!! ordering += [4,6,7,5,9,8]
|
|
204
|
+
elif elmtype in hexes:
|
|
205
|
+
!! ordering = [0,1,5,4,3,2,6,7]
|
|
206
|
+
if elmtype == hex20:
|
|
207
|
+
!! ordering += [8,16,10,12,13,19,15,14,9,11,18,17]
|
|
208
|
+
elif elmtype in prisms:
|
|
209
|
+
!! ordering = [0,2,1,3,5,4]
|
|
210
|
+
if elmtype == prism15:
|
|
211
|
+
!! ordering += [7,6,9,8,11,10,13,12,14]
|
|
212
|
+
elif elmtype in pyramids:
|
|
213
|
+
!! ordering = [3,2,1,0,4]
|
|
214
|
+
if elmtype == pyramid13:
|
|
215
|
+
!! ordering += [10,5,6,8,12,11,9,7]
|
|
216
|
+
!!! mesh.Add(Element3D(index, [nodenums2[i] for i in ordering]))
|
|
217
|
+
|
|
218
|
+
return mesh
|
|
@@ -1,32 +1,50 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools>=
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
3
|
build-backend = "setuptools.build_meta"
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "Coreform_Cubit_Mesh_Export"
|
|
7
|
-
version = "0.9.
|
|
7
|
+
version = "0.9.4"
|
|
8
8
|
authors = [
|
|
9
9
|
{name = "Kengo Sugahara", email = "ksugahar@gmail.com"},
|
|
10
10
|
]
|
|
11
|
-
|
|
11
|
+
maintainers = [
|
|
12
|
+
{name = "Kengo Sugahara", email = "ksugahar@gmail.com"},
|
|
13
|
+
]
|
|
14
|
+
description = "Cubit mesh export to various formats including Gmsh, Nastran, and VTK"
|
|
12
15
|
readme = "README.md"
|
|
16
|
+
license = {text = "BSD-3-Clause"}
|
|
13
17
|
requires-python = ">=3.7"
|
|
14
18
|
classifiers = [
|
|
19
|
+
"Development Status :: 4 - Beta",
|
|
15
20
|
"Intended Audience :: Science/Research",
|
|
16
21
|
"License :: OSI Approved :: BSD License",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
17
23
|
"Programming Language :: Python :: 3",
|
|
18
24
|
"Programming Language :: Python :: 3.7",
|
|
19
25
|
"Programming Language :: Python :: 3.8",
|
|
20
26
|
"Programming Language :: Python :: 3.9",
|
|
21
27
|
"Programming Language :: Python :: 3.10",
|
|
22
28
|
"Programming Language :: Python :: 3.11",
|
|
29
|
+
"Programming Language :: Python :: 3.12",
|
|
23
30
|
"Topic :: Scientific/Engineering",
|
|
31
|
+
"Topic :: Scientific/Engineering :: Physics",
|
|
24
32
|
]
|
|
25
33
|
dependencies = [
|
|
26
34
|
"numpy>=1.20.3",
|
|
27
35
|
"scipy>=1.6.3",
|
|
28
36
|
]
|
|
37
|
+
keywords = ["cubit", "mesh", "gmsh", "nastran", "vtk", "export", "coreform"]
|
|
29
38
|
|
|
30
39
|
[project.urls]
|
|
31
40
|
Homepage = "https://github.com/ksugahar/Coreform_Cubit_Mesh_Export"
|
|
32
|
-
Repository = "https://github.com/ksugahar/Coreform_Cubit_Mesh_Export"
|
|
41
|
+
Repository = "https://github.com/ksugahar/Coreform_Cubit_Mesh_Export"
|
|
42
|
+
"Bug Tracker" = "https://github.com/ksugahar/Coreform_Cubit_Mesh_Export/issues"
|
|
43
|
+
|
|
44
|
+
[tool.setuptools]
|
|
45
|
+
py-modules = ["cubit_mesh_export"]
|
|
46
|
+
|
|
47
|
+
[tool.setuptools.packages.find]
|
|
48
|
+
where = ["."]
|
|
49
|
+
include = ["*"]
|
|
50
|
+
exclude = ["tests*", "examples*", "docs*"]
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: Coreform_Cubit_Mesh_Export
|
|
3
|
-
Version: 0.9.1
|
|
4
|
-
Summary: Cubit_Mesh_Export: Cubit mesh export to Gmsh format
|
|
5
|
-
Home-page: https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
6
|
-
Download-URL: https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
7
|
-
Author: Kengo Sugahara
|
|
8
|
-
Author-email: Kengo Sugahara <ksugahar@gmail.com>
|
|
9
|
-
Maintainer: Kengo Sugahara
|
|
10
|
-
Maintainer-email: ksugahar@gmail.com
|
|
11
|
-
Project-URL: Homepage, https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
12
|
-
Project-URL: Repository, https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
13
|
-
Classifier: Intended Audience :: Science/Research
|
|
14
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
15
|
-
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
-
Classifier: Topic :: Scientific/Engineering
|
|
22
|
-
Requires-Python: >=3.7
|
|
23
|
-
Description-Content-Type: text/markdown
|
|
24
|
-
Requires-Dist: numpy>=1.20.3
|
|
25
|
-
Requires-Dist: scipy>=1.6.3
|
|
26
|
-
Dynamic: author
|
|
27
|
-
Dynamic: download-url
|
|
28
|
-
Dynamic: home-page
|
|
29
|
-
Dynamic: maintainer
|
|
30
|
-
Dynamic: maintainer-email
|
|
31
|
-
Dynamic: requires-python
|
|
32
|
-
|
|
33
|
-
# インストール方法
|
|
34
|
-
|
|
35
|
-
## PyPIから直接インストール(推奨)
|
|
36
|
-
```
|
|
37
|
-
pip install --upgrade Coreform_Cubit_Mesh_Export
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Cubit内蔵Pythonの場合:
|
|
41
|
-
```
|
|
42
|
-
cd "C:\Program Files\Coreform Cubit 2025.3\bin\python3\"
|
|
43
|
-
python.exe -m pip install --upgrade Coreform_Cubit_Mesh_Export
|
|
44
|
-
```
|
|
45
|
-
----
|
|
46
|
-
# サポートしているファイル
|
|
47
|
-
- gmshファイル ver.2
|
|
48
|
-
- gmshファイル ver.4 (不完全)
|
|
49
|
-
- Nastranファイル (2D)
|
|
50
|
-
- Nastranファイル (3D)
|
|
51
|
-
- ELF用ファイル (2D)
|
|
52
|
-
- ELF用ファイル (3D)
|
|
53
|
-
- vtkファイル (メッシュのみ)
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
# 使い方
|
|
57
|
-
Cubitでメッシュ生成後にpythonを実行するコマンドを入力。
|
|
58
|
-
play "Pythonスクリプト名.py"
|
|
59
|
-
を実行する。
|
|
60
|
-
"Pythonスクリプト名.py" の中身は例えば、
|
|
61
|
-
```
|
|
62
|
-
FileName = 'O:/test.nas'
|
|
63
|
-
import cubit_mesh_export
|
|
64
|
-
cubit_mesh_export.export_3D_Nastran(cubit, FileName)
|
|
65
|
-
```
|
|
66
|
-
---
|
|
67
|
-
# 関数一覧
|
|
68
|
-
- export_3D_gmsh_ver2
|
|
69
|
-
- export_3D_gmsh_ver4
|
|
70
|
-
- export_2D_Nastran
|
|
71
|
-
- export_3D_Nastran
|
|
72
|
-
- export_2D_meg
|
|
73
|
-
- export_3D_meg
|
|
74
|
-
- export_3D_vtk
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: Coreform_Cubit_Mesh_Export
|
|
3
|
-
Version: 0.9.1
|
|
4
|
-
Summary: Cubit_Mesh_Export: Cubit mesh export to Gmsh format
|
|
5
|
-
Home-page: https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
6
|
-
Download-URL: https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
7
|
-
Author: Kengo Sugahara
|
|
8
|
-
Author-email: Kengo Sugahara <ksugahar@gmail.com>
|
|
9
|
-
Maintainer: Kengo Sugahara
|
|
10
|
-
Maintainer-email: ksugahar@gmail.com
|
|
11
|
-
Project-URL: Homepage, https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
12
|
-
Project-URL: Repository, https://github.com/ksugahar/Coreform_Cubit_Mesh_Export
|
|
13
|
-
Classifier: Intended Audience :: Science/Research
|
|
14
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
15
|
-
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
-
Classifier: Topic :: Scientific/Engineering
|
|
22
|
-
Requires-Python: >=3.7
|
|
23
|
-
Description-Content-Type: text/markdown
|
|
24
|
-
Requires-Dist: numpy>=1.20.3
|
|
25
|
-
Requires-Dist: scipy>=1.6.3
|
|
26
|
-
Dynamic: author
|
|
27
|
-
Dynamic: download-url
|
|
28
|
-
Dynamic: home-page
|
|
29
|
-
Dynamic: maintainer
|
|
30
|
-
Dynamic: maintainer-email
|
|
31
|
-
Dynamic: requires-python
|
|
32
|
-
|
|
33
|
-
# インストール方法
|
|
34
|
-
|
|
35
|
-
## PyPIから直接インストール(推奨)
|
|
36
|
-
```
|
|
37
|
-
pip install --upgrade Coreform_Cubit_Mesh_Export
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Cubit内蔵Pythonの場合:
|
|
41
|
-
```
|
|
42
|
-
cd "C:\Program Files\Coreform Cubit 2025.3\bin\python3\"
|
|
43
|
-
python.exe -m pip install --upgrade Coreform_Cubit_Mesh_Export
|
|
44
|
-
```
|
|
45
|
-
----
|
|
46
|
-
# サポートしているファイル
|
|
47
|
-
- gmshファイル ver.2
|
|
48
|
-
- gmshファイル ver.4 (不完全)
|
|
49
|
-
- Nastranファイル (2D)
|
|
50
|
-
- Nastranファイル (3D)
|
|
51
|
-
- ELF用ファイル (2D)
|
|
52
|
-
- ELF用ファイル (3D)
|
|
53
|
-
- vtkファイル (メッシュのみ)
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
# 使い方
|
|
57
|
-
Cubitでメッシュ生成後にpythonを実行するコマンドを入力。
|
|
58
|
-
play "Pythonスクリプト名.py"
|
|
59
|
-
を実行する。
|
|
60
|
-
"Pythonスクリプト名.py" の中身は例えば、
|
|
61
|
-
```
|
|
62
|
-
FileName = 'O:/test.nas'
|
|
63
|
-
import cubit_mesh_export
|
|
64
|
-
cubit_mesh_export.export_3D_Nastran(cubit, FileName)
|
|
65
|
-
```
|
|
66
|
-
---
|
|
67
|
-
# 関数一覧
|
|
68
|
-
- export_3D_gmsh_ver2
|
|
69
|
-
- export_3D_gmsh_ver4
|
|
70
|
-
- export_2D_Nastran
|
|
71
|
-
- export_3D_Nastran
|
|
72
|
-
- export_2D_meg
|
|
73
|
-
- export_3D_meg
|
|
74
|
-
- export_3D_vtk
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# インストール方法
|
|
2
|
-
|
|
3
|
-
## PyPIから直接インストール(推奨)
|
|
4
|
-
```
|
|
5
|
-
pip install --upgrade Coreform_Cubit_Mesh_Export
|
|
6
|
-
```
|
|
7
|
-
|
|
8
|
-
Cubit内蔵Pythonの場合:
|
|
9
|
-
```
|
|
10
|
-
cd "C:\Program Files\Coreform Cubit 2025.3\bin\python3\"
|
|
11
|
-
python.exe -m pip install --upgrade Coreform_Cubit_Mesh_Export
|
|
12
|
-
```
|
|
13
|
-
----
|
|
14
|
-
# サポートしているファイル
|
|
15
|
-
- gmshファイル ver.2
|
|
16
|
-
- gmshファイル ver.4 (不完全)
|
|
17
|
-
- Nastranファイル (2D)
|
|
18
|
-
- Nastranファイル (3D)
|
|
19
|
-
- ELF用ファイル (2D)
|
|
20
|
-
- ELF用ファイル (3D)
|
|
21
|
-
- vtkファイル (メッシュのみ)
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
# 使い方
|
|
25
|
-
Cubitでメッシュ生成後にpythonを実行するコマンドを入力。
|
|
26
|
-
play "Pythonスクリプト名.py"
|
|
27
|
-
を実行する。
|
|
28
|
-
"Pythonスクリプト名.py" の中身は例えば、
|
|
29
|
-
```
|
|
30
|
-
FileName = 'O:/test.nas'
|
|
31
|
-
import cubit_mesh_export
|
|
32
|
-
cubit_mesh_export.export_3D_Nastran(cubit, FileName)
|
|
33
|
-
```
|
|
34
|
-
---
|
|
35
|
-
# 関数一覧
|
|
36
|
-
- export_3D_gmsh_ver2
|
|
37
|
-
- export_3D_gmsh_ver4
|
|
38
|
-
- export_2D_Nastran
|
|
39
|
-
- export_3D_Nastran
|
|
40
|
-
- export_2D_meg
|
|
41
|
-
- export_3D_meg
|
|
42
|
-
- export_3D_vtk
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Author: Kengo Sugahara <ksugahar@gmail.com>
|
|
2
|
-
# Copyright (c) 2024 Kengo Sugahara
|
|
3
|
-
# License: BSD 3 clause
|
|
4
|
-
|
|
5
|
-
from setuptools import setup, find_packages
|
|
6
|
-
|
|
7
|
-
DESCRIPTION = "Cubit_Mesh_Export: Cubit mesh export to Gmsh format"
|
|
8
|
-
NAME = 'Coreform_Cubit_Mesh_Export'
|
|
9
|
-
AUTHOR = 'Kengo Sugahara'
|
|
10
|
-
AUTHOR_EMAIL = 'ksugahar@gmail.com'
|
|
11
|
-
URL = 'https://github.com/ksugahar/Coreform_Cubit_Mesh_Export'
|
|
12
|
-
LICENSE = 'BSD 3-Clause'
|
|
13
|
-
DOWNLOAD_URL = 'https://github.com/ksugahar/Coreform_Cubit_Mesh_Export'
|
|
14
|
-
VERSION = '0.9.2'
|
|
15
|
-
PYTHON_REQUIRES = ">=3.7"
|
|
16
|
-
|
|
17
|
-
INSTALL_REQUIRES = [
|
|
18
|
-
'numpy >=1.20.3',
|
|
19
|
-
'scipy>=1.6.3',
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
EXTRAS_REQUIRE = {
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
PACKAGES = find_packages()
|
|
26
|
-
PY_MODULES = ['cubit_mesh_export']
|
|
27
|
-
|
|
28
|
-
CLASSIFIERS = [
|
|
29
|
-
'Intended Audience :: Science/Research',
|
|
30
|
-
'License :: OSI Approved :: BSD License',
|
|
31
|
-
'Programming Language :: Python :: 3',
|
|
32
|
-
'Programming Language :: Python :: 3.6',
|
|
33
|
-
'Programming Language :: Python :: 3.7',
|
|
34
|
-
'Programming Language :: Python :: 3.8',
|
|
35
|
-
'Programming Language :: Python :: 3.9',
|
|
36
|
-
'Programming Language :: Python :: 3 :: Only',
|
|
37
|
-
'Topic :: Scientific/Engineering',
|
|
38
|
-
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
|
39
|
-
]
|
|
40
|
-
|
|
41
|
-
setup(name=NAME,
|
|
42
|
-
author=AUTHOR,
|
|
43
|
-
author_email=AUTHOR_EMAIL,
|
|
44
|
-
maintainer=AUTHOR,
|
|
45
|
-
maintainer_email=AUTHOR_EMAIL,
|
|
46
|
-
description=DESCRIPTION,
|
|
47
|
-
long_description=open('README.md', 'r', encoding='utf-8').read(),
|
|
48
|
-
long_description_content_type='text/markdown',
|
|
49
|
-
license=LICENSE,
|
|
50
|
-
url=URL,
|
|
51
|
-
version=VERSION,
|
|
52
|
-
download_url=DOWNLOAD_URL,
|
|
53
|
-
python_requires=PYTHON_REQUIRES,
|
|
54
|
-
install_requires=INSTALL_REQUIRES,
|
|
55
|
-
extras_require=EXTRAS_REQUIRE,
|
|
56
|
-
packages=PACKAGES,
|
|
57
|
-
py_modules=PY_MODULES,
|
|
58
|
-
classifiers=CLASSIFIERS,
|
|
59
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|