pytetwild 0.1.dev1__cp312-cp312-win_amd64.whl → 0.1.1__cp312-cp312-win_amd64.whl
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.
- pytetwild/PyfTetWildWrapper.pyd +0 -0
- pytetwild/__init__.py +5 -6
- pytetwild/_version.py +1 -0
- pytetwild/pytetwild.py +67 -5
- pytetwild-0.1.1.dist-info/DELVEWHEEL +2 -0
- {pytetwild-0.1.dev1.dist-info → pytetwild-0.1.1.dist-info}/METADATA +8 -10
- pytetwild-0.1.1.dist-info/RECORD +13 -0
- {pytetwild-0.1.dev1.dist-info → pytetwild-0.1.1.dist-info}/WHEEL +1 -1
- pytetwild.libs/concrt140-63a42d2def1023b22584817146cee33d.dll +0 -0
- pytetwild.libs/{mpir-0f58ffaa159ebf7efb9359a55c2d7f23.dll → mpir-68915c4420c2a122a0aba56cd715bd26.dll} +0 -0
- pytetwild.libs/msvcp140-8f141b4454fa78db34bc1f28c571b4da.dll +0 -0
- pytetwild-0.1.dev1.dist-info/DELVEWHEEL +0 -2
- pytetwild-0.1.dev1.dist-info/RECORD +0 -14
- pytetwild-0.1.dev1.dist-info/entry_points.txt +0 -0
- pytetwild.libs/concrt140-ddbfd8b75976783430ced289c6b989c3.dll +0 -0
- pytetwild.libs/msvcp140-3499a3a8427eec4915749ee9a8991ddd.dll +0 -0
- {pytetwild-0.1.dev1.dist-info → pytetwild-0.1.1.dist-info}/licenses/LICENSE +0 -0
pytetwild/PyfTetWildWrapper.pyd
CHANGED
|
Binary file
|
pytetwild/__init__.py
CHANGED
|
@@ -2,16 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
# start delvewheel patch
|
|
5
|
-
def
|
|
5
|
+
def _delvewheel_patch_1_11_2():
|
|
6
6
|
import os
|
|
7
|
-
libs_dir
|
|
8
|
-
if os.path.isdir(libs_dir):
|
|
7
|
+
if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'pytetwild.libs'))):
|
|
9
8
|
os.add_dll_directory(libs_dir)
|
|
10
9
|
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
del
|
|
11
|
+
_delvewheel_patch_1_11_2()
|
|
12
|
+
del _delvewheel_patch_1_11_2
|
|
14
13
|
# end delvewheel patch
|
|
15
14
|
|
|
16
15
|
from ._version import __version__ # noqa: F401
|
|
17
|
-
from .pytetwild import tetrahedralize, tetrahedralize_pv # noqa: F401
|
|
16
|
+
from .pytetwild import tetrahedralize, tetrahedralize_pv, tetrahedralize_csg # noqa: F401
|
pytetwild/_version.py
CHANGED
pytetwild/pytetwild.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Wrapper for fTetWild."""
|
|
2
|
+
|
|
2
3
|
import warnings
|
|
3
4
|
import numpy as np
|
|
4
5
|
from pytetwild import PyfTetWildWrapper # type: ignore
|
|
@@ -15,7 +16,7 @@ def _check_edge_length(edge_length_fac: float) -> None:
|
|
|
15
16
|
Parameters
|
|
16
17
|
----------
|
|
17
18
|
edge_length_fac : float, default: 0.05
|
|
18
|
-
Tetrahedral edge length as a function of bounding box
|
|
19
|
+
Tetrahedral edge length as a function of bounding box diagonal. The
|
|
19
20
|
default ideal edge length is bb/20 (bounding box divided by 20).
|
|
20
21
|
|
|
21
22
|
|
|
@@ -35,7 +36,7 @@ def tetrahedralize_pv(
|
|
|
35
36
|
mesh : pv.PolyData
|
|
36
37
|
The input surface mesh.
|
|
37
38
|
edge_length_fac : float, default: 0.05
|
|
38
|
-
Tetrahedral edge length as a function of bounding box
|
|
39
|
+
Tetrahedral edge length as a function of bounding box diagonal. The
|
|
39
40
|
default ideal edge length is bb/20 (bounding box divided by 20).
|
|
40
41
|
optimize : bool
|
|
41
42
|
Improve the minimum scaled Jacobean for each cell. This leads to higher
|
|
@@ -66,7 +67,7 @@ def tetrahedralize_pv(
|
|
|
66
67
|
import pyvista as pv
|
|
67
68
|
except:
|
|
68
69
|
raise ModuleNotFoundError(
|
|
69
|
-
"Install PyVista to use this feature with:\n\
|
|
70
|
+
"Install PyVista to use this feature with:\n\npip install pytetwild[all]"
|
|
70
71
|
)
|
|
71
72
|
|
|
72
73
|
if not isinstance(mesh, pv.PolyData):
|
|
@@ -96,7 +97,7 @@ def tetrahedralize_pv(
|
|
|
96
97
|
)
|
|
97
98
|
cell_types = np.full(tetrahedral_mesh_tetrahedra.shape[0], 10, dtype=np.uint8)
|
|
98
99
|
|
|
99
|
-
return pv.UnstructuredGrid(cells, cell_types, tetrahedral_mesh_vertices)
|
|
100
|
+
return pv.UnstructuredGrid(cells, cell_types, tetrahedral_mesh_vertices).clean()
|
|
100
101
|
|
|
101
102
|
|
|
102
103
|
def tetrahedralize(
|
|
@@ -118,7 +119,7 @@ def tetrahedralize(
|
|
|
118
119
|
Improve the minimum scaled Jacobean for each cell. This leads to higher
|
|
119
120
|
cell quality at the expense of computation time.
|
|
120
121
|
edge_length_fac : float, default: 0.05
|
|
121
|
-
Tetrahedral edge length as a function of bounding box
|
|
122
|
+
Tetrahedral edge length as a function of bounding box diagonal. The
|
|
122
123
|
default ideal edge length is bb/20 (bounding box divided by 20).
|
|
123
124
|
|
|
124
125
|
Returns
|
|
@@ -134,3 +135,64 @@ def tetrahedralize(
|
|
|
134
135
|
vertices = vertices.astype(np.float64, copy=False)
|
|
135
136
|
faces = faces.astype(np.int32, copy=False)
|
|
136
137
|
return PyfTetWildWrapper.tetrahedralize_mesh(vertices, faces, optimize, edge_length_fac)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def tetrahedralize_csg(
|
|
141
|
+
csg_file: str,
|
|
142
|
+
epsilon: float = 1e-3,
|
|
143
|
+
edge_length_r: float = 0.05,
|
|
144
|
+
stop_energy: float = 10.0,
|
|
145
|
+
coarsen: bool = True,
|
|
146
|
+
num_threads: int = 0,
|
|
147
|
+
loglevel: int = 3,
|
|
148
|
+
) -> "pv.UnstructuredGrid":
|
|
149
|
+
"""
|
|
150
|
+
Generate a tetrahedral mesh based on a the CSG tree specified in the csf_file.
|
|
151
|
+
|
|
152
|
+
Parameters
|
|
153
|
+
----------
|
|
154
|
+
csg_file : str
|
|
155
|
+
Path to the input json file.
|
|
156
|
+
epsilon : float, default 1e-3
|
|
157
|
+
Envelop size, specifying the maximum distance of the output surface from the input surface,
|
|
158
|
+
relative to the bounding box size.
|
|
159
|
+
edge_length_r : float, default: 0.05
|
|
160
|
+
Tetrahedral edge length as a function of bounding box diagonal. The
|
|
161
|
+
default ideal edge length is bb/20 (bounding box divided by 20).
|
|
162
|
+
stop_energy : float, default: 10.0
|
|
163
|
+
The mesh optimization stops when the conformal AMIPS energy reaches 'stop_energy'.
|
|
164
|
+
coarsen : bool, default: true
|
|
165
|
+
Coarsen the output as much as possible, while maintaining the mesh quality.
|
|
166
|
+
num_threads : int, default: 0
|
|
167
|
+
Set number of threads used (0 means all available cores).
|
|
168
|
+
loglevel : int, default: 6
|
|
169
|
+
Set log level (0 = most verbose, 6 = minimal output).
|
|
170
|
+
|
|
171
|
+
Returns
|
|
172
|
+
-------
|
|
173
|
+
pv.UnstructuredGrid
|
|
174
|
+
The converted unstructured grid containing only tetrahedra,
|
|
175
|
+
with a cell attribute 'marker' indicating which of the input surfaces the cell belongs to.
|
|
176
|
+
"""
|
|
177
|
+
try:
|
|
178
|
+
import pyvista as pv
|
|
179
|
+
except:
|
|
180
|
+
raise ModuleNotFoundError(
|
|
181
|
+
"Install PyVista to use this feature with:\n\npip install pytetwild[all]"
|
|
182
|
+
)
|
|
183
|
+
(tetrahedral_mesh_vertices, tetrahedral_mesh_tetrahedra, tetrahedral_marker) = (
|
|
184
|
+
PyfTetWildWrapper.tetrahedralize_csg(
|
|
185
|
+
csg_file, epsilon, edge_length_r, stop_energy, coarsen, num_threads, loglevel
|
|
186
|
+
)
|
|
187
|
+
)
|
|
188
|
+
cells = np.hstack(
|
|
189
|
+
[
|
|
190
|
+
np.full((tetrahedral_mesh_tetrahedra.shape[0], 1), 4, dtype=np.int32),
|
|
191
|
+
tetrahedral_mesh_tetrahedra,
|
|
192
|
+
]
|
|
193
|
+
)
|
|
194
|
+
cell_types = np.full(tetrahedral_mesh_tetrahedra.shape[0], 10, dtype=np.uint8)
|
|
195
|
+
|
|
196
|
+
grid = pv.UnstructuredGrid(cells, cell_types, tetrahedral_mesh_vertices).clean()
|
|
197
|
+
grid["marker"] = tetrahedral_marker
|
|
198
|
+
return grid
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Version: 1.11.2
|
|
2
|
+
Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-aufwxr3e\\cp312-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-aufwxr3e\\cp312-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-aufwxr3e\\cp312-win_amd64\\built_wheel\\pytetwild-0.1.1-cp312-cp312-win_amd64.whl', '--add-path', '.']
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: pytetwild
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Python wrapper of fTetWild
|
|
5
5
|
Author-Email: Alex Kaszynski <akascap@gmail.com>
|
|
6
6
|
Classifier: Development Status :: 3 - Alpha
|
|
@@ -10,22 +10,20 @@ Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
|
|
|
10
10
|
Classifier: Operating System :: Microsoft :: Windows
|
|
11
11
|
Classifier: Operating System :: POSIX
|
|
12
12
|
Classifier: Operating System :: MacOS
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
17
|
Requires-Dist: numpy
|
|
18
|
+
Provides-Extra: all
|
|
19
19
|
Requires-Dist: pyvista; extra == "all"
|
|
20
|
+
Provides-Extra: dev
|
|
20
21
|
Requires-Dist: pytest; extra == "dev"
|
|
21
22
|
Requires-Dist: pre-commit; extra == "dev"
|
|
22
23
|
Requires-Dist: pyvista; extra == "dev"
|
|
23
24
|
Requires-Dist: scipy; extra == "dev"
|
|
24
25
|
Requires-Dist: meshio; extra == "dev"
|
|
25
|
-
Provides-Extra: all
|
|
26
|
-
Provides-Extra: dev
|
|
27
26
|
Description-Content-Type: text/x-rst
|
|
28
|
-
License-File: LICENSE
|
|
29
27
|
|
|
30
28
|
pytetwild
|
|
31
29
|
#########
|
|
@@ -75,7 +73,7 @@ To tetrahedralize a surface mesh from `PyVista <https://docs.pyvista.org>`_:
|
|
|
75
73
|
|
|
76
74
|
# Convert the surface mesh to a tetrahedral mesh. For this example let's
|
|
77
75
|
# use a coarse mesh
|
|
78
|
-
tetrahedral_mesh = pytetwild.tetrahedralize_pv(surface_mesh, edge_length_fac=1)
|
|
76
|
+
tetrahedral_mesh = pytetwild.tetrahedralize_pv(surface_mesh, edge_length_fac=1)
|
|
79
77
|
|
|
80
78
|
# Visualize the tetrahedral mesh in an "exploded" view
|
|
81
79
|
tetrahedral_mesh.explode(1).plot(show_edges=True)
|
|
@@ -84,7 +82,7 @@ To tetrahedralize a surface mesh from `PyVista <https://docs.pyvista.org>`_:
|
|
|
84
82
|
|
|
85
83
|
You can also work with raw arrays. Here's a simple cube that we turn into tetrahedra.
|
|
86
84
|
|
|
87
|
-
.. code::
|
|
85
|
+
.. code:: py
|
|
88
86
|
|
|
89
87
|
import numpy as np
|
|
90
88
|
|
|
@@ -123,7 +121,7 @@ We've surfaced a handful of parameters to each of our interfaces
|
|
|
123
121
|
Additional Parameters
|
|
124
122
|
---------------------
|
|
125
123
|
edge_length_fac : float, default: 0.05
|
|
126
|
-
Tetrahedral edge length as a function of bounding box
|
|
124
|
+
Tetrahedral edge length as a function of bounding box diagonal. The
|
|
127
125
|
default ideal edge length is bb/20 (bounding box divided by 20).
|
|
128
126
|
optimize : bool
|
|
129
127
|
Improve the minimum scaled Jacobean for each cell. This leads to higher
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
pytetwild/py.typed,sha256=mDShSrm8qg9qjacQc2F-rI8ATllqP6EdgHuEYxuCXZ0,7
|
|
2
|
+
pytetwild/PyfTetWildWrapper.pyd,sha256=ol9Knvqr5Kf4MHq22-X3yRVJUgKYYswgHV0x8bdjqAk,5940736
|
|
3
|
+
pytetwild/pytetwild.py,sha256=JZNJzIsoC9fOLqb4xDJ7oREJarEYkdvCgbIgRCvp52Q,6977
|
|
4
|
+
pytetwild/_version.py,sha256=A4_1DWpVQi-Rp5-lH3Itz0MNxg-VoQh0v0s0Wub4PQ4,120
|
|
5
|
+
pytetwild/__init__.py,sha256=l0Dwm58loQqSSrYqdxUx8lRHxeEBYyxr9gBvmvo-QIA,498
|
|
6
|
+
pytetwild-0.1.1.dist-info/DELVEWHEEL,sha256=c7PLQUz98MRU1_k7pfUBO60FuE1AfgWCkxr52fi2ayU,421
|
|
7
|
+
pytetwild-0.1.1.dist-info/METADATA,sha256=4NA0MlyTgECJengiMK3QHzM89oMFU_IPMCscS8Mg4u0,4508
|
|
8
|
+
pytetwild-0.1.1.dist-info/RECORD,,
|
|
9
|
+
pytetwild-0.1.1.dist-info/WHEEL,sha256=chqeLhPBtPdrOoreR34YMcofSk3yWDQhkrsDJ2n48LU,106
|
|
10
|
+
pytetwild-0.1.1.dist-info/licenses/LICENSE,sha256=k0P1sbYupRWlxoESvbYq2UzoMW6MXA84LltqR-4mEo4,17096
|
|
11
|
+
pytetwild.libs/concrt140-63a42d2def1023b22584817146cee33d.dll,sha256=tWTNrcqIbCkALGnMNEoKRuaSbXscOIw0F5gWYZzfmDY,304128
|
|
12
|
+
pytetwild.libs/mpir-68915c4420c2a122a0aba56cd715bd26.dll,sha256=96pOmyi8-b4gAyXakkz7w0arxMoDHxmlAU33OZXMKAY,612352
|
|
13
|
+
pytetwild.libs/msvcp140-8f141b4454fa78db34bc1f28c571b4da.dll,sha256=jxQbRFT6eNs0vB8oxXG02g4AzSxD960OKC8xMDaCaq4,557648
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
Version: 1.5.4
|
|
2
|
-
Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-rdukv1yg\\cp312-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-rdukv1yg\\cp312-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-rdukv1yg\\cp312-win_amd64\\built_wheel\\pytetwild-0.1.dev1-cp312-cp312-win_amd64.whl', '--add-path', '.']
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
pytetwild/py.typed,sha256=mDShSrm8qg9qjacQc2F-rI8ATllqP6EdgHuEYxuCXZ0,7
|
|
2
|
-
pytetwild/PyfTetWildWrapper.pyd,sha256=qY_7ac27j4iFpTIsNINU1hez1_I9aMqQYzNSy9PwM9Q,4992000
|
|
3
|
-
pytetwild/pytetwild.py,sha256=PSLlG5czLo2Z2aZtcgxmZAy97E9eAtbo7EdvY0WONIs,4646
|
|
4
|
-
pytetwild/_version.py,sha256=hbg9UkagWDGV6Zg23kEpex_otuUYHUzMCHXYTnFnHmE,118
|
|
5
|
-
pytetwild/__init__.py,sha256=QdK3GINbrnK1cwEauX0cPgzkVCa1VPait8aGT2AJN4Q,486
|
|
6
|
-
pytetwild-0.1.dev1.dist-info/DELVEWHEEL,sha256=1CRpEzc_AUEnYZnt1Kh9fEzAekI8sXjRGcm3ixZdtRM,423
|
|
7
|
-
pytetwild-0.1.dev1.dist-info/entry_points.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
pytetwild-0.1.dev1.dist-info/METADATA,sha256=6I1FzXoY9ezDC8EWamtUR2MVxWtBvgjD5frhxz4gw6Y,4587
|
|
9
|
-
pytetwild-0.1.dev1.dist-info/RECORD,,
|
|
10
|
-
pytetwild-0.1.dev1.dist-info/WHEEL,sha256=I4fjUu5CKXtMlETsB-F4Q7DROW-oHB8rNWT-iDmQHok,105
|
|
11
|
-
pytetwild-0.1.dev1.dist-info/licenses/LICENSE,sha256=k0P1sbYupRWlxoESvbYq2UzoMW6MXA84LltqR-4mEo4,17096
|
|
12
|
-
pytetwild.libs/concrt140-ddbfd8b75976783430ced289c6b989c3.dll,sha256=BZPGv1uz0YBgBOgTWBBL0elt7C3clmR348_2Zlqh47Q,302080
|
|
13
|
-
pytetwild.libs/mpir-0f58ffaa159ebf7efb9359a55c2d7f23.dll,sha256=qd6vEIL0JPtRZ39EzelGE9rApfJ6duoMgV8jT8UHGns,612352
|
|
14
|
-
pytetwild.libs/msvcp140-3499a3a8427eec4915749ee9a8991ddd.dll,sha256=oDDcLf0uyiipN1ySmJrfTa8WH5iNteFrnhBnjrDf9Mc,573008
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
File without changes
|