hexamsh 1.0.1__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.
hexamsh-1.0.1/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Michelin
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ 1. Redistributions of source code must retain the above copyright notice, this
9
+ list of conditions and the following disclaimer.
10
+
11
+ 2. Redistributions in binary form must reproduce the above copyright notice,
12
+ this list of conditions and the following disclaimer in the documentation
13
+ and/or other materials provided with the distribution.
14
+
15
+ 3. Neither the name of the copyright holder nor the names of its
16
+ contributors may be used to endorse or promote products derived from
17
+ this software without specific prior written permission.
18
+
19
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
hexamsh-1.0.1/PKG-INFO ADDED
@@ -0,0 +1,67 @@
1
+ Metadata-Version: 2.4
2
+ Name: hexamsh
3
+ Version: 1.0.1
4
+ Summary: Generate structured hexahedral meshes for finite element analysis from CAD models using Gmsh.
5
+ License-Expression: BSD-3-Clause
6
+ Project-URL: Homepage, https://github.com/michelin/HexaMSH
7
+ Project-URL: Repository, https://github.com/michelin/HexaMSH
8
+ Project-URL: Issues, https://github.com/michelin/HexaMSH/issues
9
+ Keywords: hexahedral-mesh,mesh-generation,gmsh,finite-element-analysis
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Topic :: Scientific/Engineering
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Requires-Python: ==3.12.*
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: gmsh==4.15.2
18
+ Requires-Dist: numpy
19
+ Requires-Dist: click
20
+ Requires-Dist: scipy
21
+ Requires-Dist: keyboard
22
+ Requires-Dist: pynput
23
+ Provides-Extra: dev
24
+ Requires-Dist: bandit; extra == "dev"
25
+ Requires-Dist: black; extra == "dev"
26
+ Requires-Dist: isort; extra == "dev"
27
+ Requires-Dist: pylint; extra == "dev"
28
+ Requires-Dist: pytest; extra == "dev"
29
+ Requires-Dist: pytest-cov; extra == "dev"
30
+ Requires-Dist: pytest-html; extra == "dev"
31
+ Requires-Dist: sphinx; extra == "dev"
32
+ Requires-Dist: sphinx-copybutton; extra == "dev"
33
+ Dynamic: license-file
34
+
35
+ # HexaMSH
36
+
37
+ HexaMSH is a python library to generate structured hexahedral meshes for Finite Element Analysis.
38
+
39
+ It is based on the python API of gmsh and its GUI.
40
+
41
+ 📖 Documentation: <https://opensource.michelin.io/HexaMSH/>
42
+
43
+ ![Generated hexahedral mesh of Workpiece 2](docs/images/hexamsh.png)
44
+
45
+ > **License notice:** Users of HexaMSH must comply with the BSD-3-Clause license for the HexaMSH layer ([LICENSE](LICENSE)) and the GNU GPL v2-or-later license for Gmsh ([license terms](https://gmsh.info/LICENSE.txt)).
46
+
47
+ ## Getting started
48
+
49
+ For now, HexaMSH is not available through PyPI.
50
+
51
+ Please git clone the github project and locally install
52
+
53
+ `pip install .`
54
+
55
+ and then execute
56
+
57
+ `hexamsh my_cad.stp`
58
+
59
+ where `my_cad.stp` is the step file you want to mesh (it can either be a step, stp or brep).
60
+
61
+ Please work with only one CAD file per directory, otherwise HexaMSH will complain.
62
+
63
+ ## Contributing
64
+
65
+ Contributions are welcome. Please read the [Contributing Guide](CONTRIBUTING.md) before
66
+ opening an issue or submitting a pull request. All contributors are expected to follow
67
+ the [Code of Conduct](CODE_OF_CONDUCT.md).
@@ -0,0 +1,33 @@
1
+ # HexaMSH
2
+
3
+ HexaMSH is a python library to generate structured hexahedral meshes for Finite Element Analysis.
4
+
5
+ It is based on the python API of gmsh and its GUI.
6
+
7
+ 📖 Documentation: <https://opensource.michelin.io/HexaMSH/>
8
+
9
+ ![Generated hexahedral mesh of Workpiece 2](docs/images/hexamsh.png)
10
+
11
+ > **License notice:** Users of HexaMSH must comply with the BSD-3-Clause license for the HexaMSH layer ([LICENSE](LICENSE)) and the GNU GPL v2-or-later license for Gmsh ([license terms](https://gmsh.info/LICENSE.txt)).
12
+
13
+ ## Getting started
14
+
15
+ For now, HexaMSH is not available through PyPI.
16
+
17
+ Please git clone the github project and locally install
18
+
19
+ `pip install .`
20
+
21
+ and then execute
22
+
23
+ `hexamsh my_cad.stp`
24
+
25
+ where `my_cad.stp` is the step file you want to mesh (it can either be a step, stp or brep).
26
+
27
+ Please work with only one CAD file per directory, otherwise HexaMSH will complain.
28
+
29
+ ## Contributing
30
+
31
+ Contributions are welcome. Please read the [Contributing Guide](CONTRIBUTING.md) before
32
+ opening an issue or submitting a pull request. All contributors are expected to follow
33
+ the [Code of Conduct](CODE_OF_CONDUCT.md).
@@ -0,0 +1,15 @@
1
+ # coding: utf-8
2
+ """Main module of HexaMSH."""
3
+
4
+ try:
5
+ from .version import __version__, __version_date__
6
+ except ImportError:
7
+ __version__ = None
8
+ __version_date__ = ""
9
+
10
+
11
+ def main(*args, **kwargs):
12
+ """Lazy CLI entrypoint to avoid import-time side effects during packaging."""
13
+ from .hexamsh import main as _main
14
+
15
+ return _main(*args, **kwargs)
@@ -0,0 +1,177 @@
1
+ GUI_PARAMETERS = """[
2
+ {
3
+ "type":"number",
4
+ "name":"Geometry/Undo previous action",
5
+ "values":[0],
6
+ "choices":[0, 1]
7
+ },
8
+ {
9
+ "type":"number",
10
+ "name":"Geometry/Heal/ CAD",
11
+ "values":[0],
12
+ "choices":[0, 1]
13
+ },
14
+ {
15
+ "type":"number",
16
+ "name":"Geometry/Heal/ Surfaces",
17
+ "values":[0],
18
+ "choices":[0, 1]
19
+ },
20
+ {
21
+ "type":"number",
22
+ "name":"Geometry/Add/A point on a curve (ratio)",
23
+ "values":[0],
24
+ "min":0,
25
+ "max":1,
26
+ "step":0.1
27
+ },
28
+ {
29
+ "type":"number",
30
+ "name":"Geometry/Add/A surface by curve loop",
31
+ "values":[0],
32
+ "choices":[0, 1]
33
+ },
34
+ {
35
+ "type":"number",
36
+ "name":"Geometry/Add/A surface by point loop",
37
+ "values":[0],
38
+ "choices":[0, 1]
39
+ },
40
+ {
41
+ "type":"number",
42
+ "name":"Geometry/Split/A surface by a curve",
43
+ "values":[0],
44
+ "choices":[0, 1]
45
+ },
46
+ {
47
+ "type":"number",
48
+ "name":"Geometry/Add/A volume between two surfaces",
49
+ "values":[0],
50
+ "choices":[0, 1]
51
+ },
52
+ {
53
+ "type":"number",
54
+ "name":"Geometry/Project/A point on a curve",
55
+ "values":[0],
56
+ "choices":[0, 1]
57
+ },
58
+ {
59
+ "type":"number",
60
+ "name":"Geometry/Project/A surface on a surface",
61
+ "values":[0],
62
+ "choices":[0, 1]
63
+ },
64
+ {
65
+ "type":"number",
66
+ "name":"Geometry/Split/A volume by an infinite plane (3 points)",
67
+ "values":[0],
68
+ "choices":[0, 1]
69
+ },
70
+ {
71
+ "type":"number",
72
+ "name":"Geometry/Split/A volume by a finite plane (4 points)",
73
+ "values":[0],
74
+ "choices":[0, 1]
75
+ },
76
+ {
77
+ "type":"number",
78
+ "name":"Geometry/Split/A volume by a point loop",
79
+ "values":[0],
80
+ "choices":[0, 1]
81
+ },
82
+ {
83
+ "type":"number",
84
+ "name":"Geometry/Split/A triangle surface",
85
+ "values":[0],
86
+ "choices":[0, 1]
87
+ },
88
+ {
89
+ "type":"number",
90
+ "name":"Geometry/Split/A wedge volume",
91
+ "values":[0],
92
+ "choices":[0, 1]
93
+ },
94
+ {
95
+ "type":"number",
96
+ "name":"Geometry/Remove/Surfaces",
97
+ "values":[0],
98
+ "choices":[0, 1]
99
+ },
100
+
101
+ {
102
+ "type":"number",
103
+ "name":"Geometry/Remove/Curves",
104
+ "values":[0],
105
+ "choices":[0, 1]
106
+ },
107
+ {
108
+ "type":"number",
109
+ "name":"Geometry/Remove/All orphan curves",
110
+ "values":[0],
111
+ "choices":[0, 1]
112
+ },
113
+ {
114
+ "type":"number",
115
+ "name":"Geometry/Remove/All duplicates",
116
+ "values":[0],
117
+ "choices":[0, 1]
118
+ },
119
+ {
120
+ "type":"number",
121
+ "name":"Geometry/Merge/Two Curves",
122
+ "values":[0],
123
+ "choices":[0, 1]
124
+ },
125
+ {
126
+ "type":"number",
127
+ "name":"Geometry/Merge/Two Surfaces",
128
+ "values":[0],
129
+ "choices":[0, 1]
130
+ },
131
+ {
132
+ "type":"number",
133
+ "name":"Mesh/Set number of nodes on /One edge",
134
+ "values":[5],
135
+ "min":1,
136
+ "max":100,
137
+ "step":1
138
+ },
139
+ {
140
+ "type":"number",
141
+ "name":"Mesh/Set number of nodes on /All edges",
142
+ "values":[5],
143
+ "min":1,
144
+ "max":100,
145
+ "step":1
146
+ },
147
+ {
148
+ "type":"number",
149
+ "name":"View/Show all volumes",
150
+ "values":[0],
151
+ "choices":[0, 1]
152
+ },
153
+ {
154
+ "type":"number",
155
+ "name":"View/Hide all meshable volumes",
156
+ "values":[0],
157
+ "choices":[0, 1]
158
+ },
159
+ {
160
+ "type":"number",
161
+ "name":"View/Hide all non-meshable volumes",
162
+ "values":[0],
163
+ "choices":[0, 1]
164
+ },
165
+ {
166
+ "type":"number",
167
+ "name":"View/Hide volumes by selecting a surface",
168
+ "values":[0],
169
+ "choices":[0, 1]
170
+ },
171
+ {
172
+ "type":"string",
173
+ "name":"ONELAB/Button",
174
+ "values":["Mesh CAD", "Write mesh"],
175
+ "visible":false
176
+ }
177
+ ]"""