pytetwild 0.2.0__cp312-abi3-macosx_15_0_x86_64.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.
Binary file
Binary file
@@ -0,0 +1,29 @@
1
+ import numpy as np
2
+ from numpy.typing import NDArray
3
+
4
+ def tetrahedralize_mesh(
5
+ vertices: NDArray[np.float64],
6
+ faces: NDArray[np.uint32],
7
+ optimize: bool,
8
+ skip_simplify: bool,
9
+ edge_length_r: float,
10
+ edge_length_abs: float,
11
+ epsilon: float,
12
+ stop_energy: float,
13
+ coarsen: bool,
14
+ num_threads: int,
15
+ num_opt_iter: int,
16
+ loglevel: int,
17
+ quiet: bool,
18
+ vtk_ordering: bool,
19
+ ) -> tuple[NDArray[np.float64], NDArray[np.int32]]: ...
20
+ def tetrahedralize_csg(
21
+ csg_file: str,
22
+ epsilon: float,
23
+ edge_length_r: float,
24
+ stop_energy: float,
25
+ coarsen: bool,
26
+ num_threads: int,
27
+ log_level: int,
28
+ vtk_ordering: bool,
29
+ ) -> tuple[NDArray[np.float64], NDArray[np.int32], NDArray[np.int32]]: ...
pytetwild/__init__.py ADDED
@@ -0,0 +1,4 @@
1
+ """Wrapper for fTetWild."""
2
+
3
+ from ._version import __version__ # noqa: F401
4
+ from .pytetwild import tetrahedralize, tetrahedralize_pv, tetrahedralize_csg # noqa: F401
pytetwild/_version.py ADDED
@@ -0,0 +1,5 @@
1
+ """Contains the pytetwild version."""
2
+
3
+ from importlib import metadata
4
+
5
+ __version__ = metadata.version("pytetwild")
pytetwild/py.typed ADDED
@@ -0,0 +1 @@
1
+ partial
pytetwild/pytetwild.py ADDED
@@ -0,0 +1,365 @@
1
+ """Wrapper for fTetWild."""
2
+
3
+ import warnings
4
+ import numpy as np
5
+ from pytetwild import PyfTetWildWrapper
6
+ from typing import TYPE_CHECKING
7
+ from numpy.typing import NDArray
8
+
9
+ if TYPE_CHECKING:
10
+ import pyvista as pv
11
+
12
+ VTK_UNSIGNED_CHAR = 3
13
+ VTK_TETRA = 10
14
+ VTK_QUADRATIC_TETRA = 24
15
+
16
+
17
+ def _check_edge_length(edge_length_fac: float) -> None:
18
+ """Check edge length.
19
+
20
+ Parameters
21
+ ----------
22
+ edge_length_fac : float, default: 0.05
23
+ Tetrahedral edge length as a function of bounding box diagonal. The
24
+ default ideal edge length is bb/20 (bounding box divided by 20).
25
+
26
+ """
27
+ if edge_length_fac > 1.0 or edge_length_fac < 0.0 + 1e-16:
28
+ raise ValueError("Edge length factor must be between 1e-16 and 1.0")
29
+
30
+
31
+ def _ugrid_from_regular_cells(
32
+ points: NDArray[np.float32] | NDArray[np.float64],
33
+ cells: NDArray[np.int32],
34
+ ) -> "pv.UnstructuredGrid":
35
+ """
36
+ Create an UnstructuredGrid from points and fixed-size cells.
37
+
38
+ Parameters
39
+ ----------
40
+ points : np.ndarray[np.float64]
41
+ Point coordinates.
42
+ cells : np.ndarray[np.int32]
43
+ Cell connectivity without padding. Cell type inferred from shape.
44
+
45
+ Returns
46
+ -------
47
+ pyvista.UnstructuredGrid
48
+ Unstructured grid.
49
+
50
+ """
51
+ try:
52
+ import pyvista.core as pv
53
+ except:
54
+ raise ModuleNotFoundError(
55
+ "Install PyVista to use this feature with:\n\npip install pytetwild[all]"
56
+ )
57
+
58
+ from vtkmodules.vtkCommonCore import vtkTypeInt32Array
59
+ from vtkmodules.util.numpy_support import numpy_to_vtk
60
+ from vtkmodules.vtkCommonDataModel import vtkCellArray
61
+
62
+ if cells.ndim != 2:
63
+ raise ValueError("cells must be 2D")
64
+
65
+ grid = pv.UnstructuredGrid()
66
+ grid.points = points
67
+
68
+ n_cells, n_nodes_per_cell = cells.shape
69
+ vtk_dtype = vtkTypeInt32Array().GetDataType()
70
+ offsets = np.arange(0, n_cells * n_nodes_per_cell + 1, n_nodes_per_cell, dtype=np.int32)
71
+ offsets_vtk = numpy_to_vtk(offsets, deep=False, array_type=vtk_dtype)
72
+ conn_vtk = numpy_to_vtk(cells.ravel(), deep=False, array_type=vtk_dtype)
73
+
74
+ cell_array = vtkCellArray()
75
+ cell_array.SetData(offsets_vtk, conn_vtk)
76
+
77
+ if n_nodes_per_cell == 4:
78
+ cell_type = VTK_TETRA
79
+ elif n_nodes_per_cell == 10:
80
+ cell_type = VTK_QUADRATIC_TETRA
81
+ else:
82
+ raise ValueError(f"Unsupported number of nodes per cells {n_nodes_per_cell}")
83
+
84
+ celltypes = numpy_to_vtk(
85
+ np.full(n_cells, cell_type, dtype=np.uint8), deep=False, array_type=VTK_UNSIGNED_CHAR
86
+ )
87
+ grid.SetCells(celltypes, cell_array)
88
+ return grid
89
+
90
+
91
+ def tetrahedralize_pv(
92
+ mesh: "pv.PolyData",
93
+ edge_length_fac: float = 0.05,
94
+ edge_length_abs: float | None = None,
95
+ optimize: bool = True,
96
+ simplify: bool = True,
97
+ epsilon: float = 1e-3,
98
+ stop_energy: float = 10.0,
99
+ coarsen: bool = False,
100
+ num_threads: int = 0,
101
+ num_opt_iter: int = 80,
102
+ loglevel: int = 3,
103
+ quiet: bool = True,
104
+ ) -> "pv.UnstructuredGrid":
105
+ """
106
+ Convert a PyVista surface mesh to a PyVista unstructured grid.
107
+
108
+ Parameters
109
+ ----------
110
+ mesh : pv.PolyData
111
+ The input surface mesh. Should be composed of all triangles.
112
+ edge_length_fac : float, default: 0.05
113
+ Tetrahedral edge length as a function of bounding box diagonal. The
114
+ default ideal edge length is ``bb/20`` (bounding box divided by
115
+ 20). Ignored when ``edge_length_abs`` is input.
116
+ edge_length_abs : float, optional
117
+ Absolute ideal edge length. When input ``edge_length_fac`` is ignored.
118
+ optimize : bool, default: True
119
+ Improve the minimum scaled Jacobean for each cell. This leads to higher
120
+ cell quality at the expense of computation time. Optimization level is
121
+ dependent on ``stop_energy`` and ``num_opt_iter``.
122
+ simplify : bool, default: True
123
+ Simplfiy the input mesh surface before tetrahedralization.
124
+ epsilon : float, default 1e-3
125
+ Envelop size, specifying the maximum distance of the output surface
126
+ from the input surface, relative to the bounding box size.
127
+ stop_energy : float, default: 10.0
128
+ The mesh optimization stops when the conformal AMIPS energy reaches
129
+ ``stop_energy``.
130
+ coarsen : bool, default: False
131
+ Coarsen the output as much as possible, while maintaining the mesh
132
+ quality.
133
+ num_threads : int, default: 0
134
+ Set number of threads used. 0 (default) uses all available cores.
135
+ num_opt_iter : int, default: 80
136
+ Maximum number of optimization iterations if ``optimize=True``.
137
+ loglevel : int, default: 6
138
+ Set log level (0 = most verbose, 6 = minimal output).
139
+ quiet : bool, default: False
140
+ Disable all output. Overrides ``loglevel``.
141
+
142
+ Returns
143
+ -------
144
+ pv.UnstructuredGrid
145
+ The converted unstructured grid containing only tetrahedra.
146
+
147
+ Examples
148
+ --------
149
+ >>> import pyvista as pv
150
+ >>> import pytetwild
151
+ >>> surface_mesh = pv.Sphere()
152
+ >>> tetrahedral_mesh = pytetwild.tetrahedralize_pv(surface_mesh)
153
+ >>> tetrahedral_mesh
154
+ UnstructuredGrid (0x7ff568593d00)
155
+ N Cells: 7247
156
+ N Points: 1658
157
+ X Bounds: -4.993e-01, 4.993e-01
158
+ Y Bounds: -4.965e-01, 4.965e-01
159
+ Z Bounds: -5.000e-01, 4.999e-01
160
+ N Arrays: 0
161
+
162
+ """
163
+ try:
164
+ import pyvista.core as pv
165
+ except:
166
+ raise ModuleNotFoundError(
167
+ "Install PyVista to use this feature with:\n\npip install pytetwild[all]"
168
+ )
169
+
170
+ if not isinstance(mesh, pv.PolyData):
171
+ raise TypeError(f"`mesh` must be a pyvista.PolyData, got {type(mesh)}")
172
+ if not mesh.is_all_triangles:
173
+ warnings.warn(
174
+ "Input mesh is not all triangles. Either call `.triangulate()`"
175
+ " beforehand to suppress this warning or use an all triangle mesh."
176
+ )
177
+ mesh = mesh.triangulate()
178
+ _check_edge_length(edge_length_fac)
179
+
180
+ if edge_length_abs is None:
181
+ edge_length_abs = 0.0
182
+
183
+ vertices = mesh.points.astype(np.float64, copy=False)
184
+ faces = mesh._connectivity_array.reshape(-1, 3)
185
+ if faces.dtype == np.int32:
186
+ # we can cheat here and just treat it as unsigned 32 (assuming no negative indices)
187
+ faces_unsigned = faces.view(np.uint32)
188
+ else:
189
+ faces_unsigned = faces.astype(np.uint32, copy=False)
190
+
191
+ skip_simplify = not simplify
192
+ vtk_ordering = True
193
+ tmesh_v, tmesh_c = PyfTetWildWrapper.tetrahedralize_mesh(
194
+ vertices,
195
+ faces_unsigned,
196
+ optimize,
197
+ skip_simplify,
198
+ edge_length_fac,
199
+ edge_length_abs,
200
+ epsilon,
201
+ stop_energy,
202
+ coarsen,
203
+ num_threads,
204
+ num_opt_iter,
205
+ loglevel,
206
+ quiet,
207
+ vtk_ordering,
208
+ )
209
+ return _ugrid_from_regular_cells(tmesh_v, tmesh_c)
210
+
211
+
212
+ def tetrahedralize(
213
+ vertices: NDArray[np.float32] | NDArray[np.float64],
214
+ faces: NDArray[np.int32],
215
+ edge_length_fac: float = 0.05,
216
+ edge_length_abs: float | None = None,
217
+ optimize: bool = True,
218
+ simplify: bool = True,
219
+ epsilon: float = 1e-3,
220
+ stop_energy: float = 10.0,
221
+ coarsen: bool = False,
222
+ num_threads: int = 0,
223
+ num_opt_iter: int = 80,
224
+ loglevel: int = 3,
225
+ quiet: bool = True,
226
+ vtk_ordering: bool = False,
227
+ ) -> tuple[NDArray[np.float64], NDArray[np.int32]]:
228
+ """
229
+ Convert mesh vertices and faces to a tetrahedral mesh.
230
+
231
+ Parameters
232
+ ----------
233
+ vertices : np.ndarray[np.float32] | np.ndarray[np.float64]
234
+ The vertices of the mesh.
235
+ faces : np.ndarray[np.int32]
236
+ The faces of the mesh.
237
+ edge_length_fac : float, default: 0.05
238
+ Tetrahedral edge length as a function of bounding box diagonal. The
239
+ default ideal edge length is bb/20 (bounding box divided by
240
+ 20). Ignored when ``edge_length_abs`` is input.
241
+ edge_length_abs : float, optional
242
+ Absolute ideal edge length. When input ``edge_length_fac`` is ignored.
243
+ optimize : bool
244
+ Improve the minimum scaled Jacobean for each cell. This leads to higher
245
+ cell quality at the expense of computation time.
246
+ simplify : bool, default: True
247
+ Simplfiy the input mesh surface before tetrahedralization.
248
+ epsilon : float, default 1e-3
249
+ Envelop size, specifying the maximum distance of the output surface
250
+ from the input surface, relative to the bounding box size.
251
+ stop_energy : float, default: 10.0
252
+ The mesh optimization stops when the conformal AMIPS energy reaches
253
+ ``stop_energy``.
254
+ coarsen : bool, default: False
255
+ Coarsen the output as much as possible, while maintaining the mesh
256
+ quality.
257
+ num_threads : int, default: 0
258
+ Set number of threads used. 0 (default) uses all available cores.
259
+ num_opt_iter : int, default: 80
260
+ Maximum number of optimization iterations if ``optimize=True``.
261
+ loglevel : int, default: 6
262
+ Set log level (0 = most verbose, 6 = minimal output).
263
+ quiet : bool, default: False
264
+ Disable all output. Overrides ``loglevel``.
265
+ vtk_ordering : bool, default: False
266
+ Reorder the tetrahedral cell indices to match VTK's ordering.
267
+
268
+ Returns
269
+ -------
270
+ Tuple[np.ndarray, np.ndarray]
271
+ A tuple containing the vertices and tetrahedra of the tetrahedral mesh.
272
+ """
273
+ _check_edge_length(edge_length_fac)
274
+ if not isinstance(vertices, np.ndarray):
275
+ raise TypeError("`vertices` must be a numpy array")
276
+ if not isinstance(faces, np.ndarray):
277
+ raise TypeError("`faces` must be a numpy array")
278
+ vertices = vertices.astype(np.float64, copy=False)
279
+ if faces.dtype == np.int32:
280
+ # we can cheat here and just treat it as unsigned 32 (assuming no negative indices)
281
+ faces_unsigned = faces.view(np.uint32)
282
+ else:
283
+ faces_unsigned = faces.astype(np.uint32, copy=False)
284
+
285
+ if edge_length_abs is None:
286
+ edge_length_abs = 0.0
287
+
288
+ skip_simplify = not simplify
289
+ return PyfTetWildWrapper.tetrahedralize_mesh(
290
+ vertices,
291
+ faces_unsigned,
292
+ optimize,
293
+ skip_simplify,
294
+ edge_length_fac,
295
+ edge_length_abs,
296
+ epsilon,
297
+ stop_energy,
298
+ coarsen,
299
+ num_threads,
300
+ num_opt_iter,
301
+ loglevel,
302
+ quiet,
303
+ vtk_ordering,
304
+ )
305
+
306
+
307
+ def tetrahedralize_csg(
308
+ csg_file: str,
309
+ epsilon: float = 1e-3,
310
+ edge_length_r: float = 0.05,
311
+ stop_energy: float = 10.0,
312
+ coarsen: bool = True,
313
+ num_threads: int = 0,
314
+ loglevel: int = 3,
315
+ ) -> "pv.UnstructuredGrid":
316
+ """
317
+ Generate a tetrahedral mesh based on a the CSG tree specified in the csf_file.
318
+
319
+ Parameters
320
+ ----------
321
+ csg_file : str
322
+ Path to the input json file.
323
+ epsilon : float, default 1e-3
324
+ Envelop size, specifying the maximum distance of the output surface
325
+ from the input surface, relative to the bounding box size.
326
+ edge_length_r : float, default: 0.05
327
+ Tetrahedral edge length as a function of bounding box diagonal. The
328
+ default ideal edge length is bb/20 (bounding box divided by 20).
329
+ stop_energy : float, default: 10.0
330
+ The mesh optimization stops when the conformal AMIPS energy reaches 'stop_energy'.
331
+ coarsen : bool, default: true
332
+ Coarsen the output as much as possible, while maintaining the mesh quality.
333
+ num_threads : int, default: 0
334
+ Set number of threads used (0 means all available cores).
335
+ loglevel : int, default: 6
336
+ Set log level (0 = most verbose, 6 = minimal output).
337
+
338
+ Returns
339
+ -------
340
+ pv.UnstructuredGrid
341
+ The converted unstructured grid containing only tetrahedra, with a cell
342
+ attribute 'marker' indicating which of the input surfaces the cell
343
+ belongs to.
344
+ """
345
+ try:
346
+ pass
347
+ except:
348
+ raise ModuleNotFoundError(
349
+ "Install PyVista to use this feature with:\n\npip install pytetwild[all]"
350
+ )
351
+ vtk_ordering = True
352
+ tmesh_v, tmesh_c, tmesh_marker = PyfTetWildWrapper.tetrahedralize_csg(
353
+ csg_file,
354
+ epsilon,
355
+ edge_length_r,
356
+ stop_energy,
357
+ coarsen,
358
+ num_threads,
359
+ loglevel,
360
+ vtk_ordering,
361
+ )
362
+
363
+ ugrid = _ugrid_from_regular_cells(tmesh_v, tmesh_c).clean()
364
+ ugrid["marker"] = tmesh_marker
365
+ return ugrid
@@ -0,0 +1,180 @@
1
+ Metadata-Version: 2.2
2
+ Name: pytetwild
3
+ Version: 0.2.0
4
+ Summary: Python wrapper of fTetWild
5
+ Author-Email: Alex Kaszynski <akascap@gmail.com>
6
+ Classifier: Development Status :: 3 - Alpha
7
+ Classifier: Intended Audience :: Science/Research
8
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
9
+ Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
10
+ Classifier: Operating System :: Microsoft :: Windows
11
+ Classifier: Operating System :: POSIX
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Requires-Python: <3.15,>=3.10
19
+ Requires-Dist: numpy
20
+ Provides-Extra: all
21
+ Requires-Dist: pyvista; extra == "all"
22
+ Provides-Extra: tests
23
+ Requires-Dist: pytest; extra == "tests"
24
+ Requires-Dist: pyvista; extra == "tests"
25
+ Requires-Dist: scipy; extra == "tests"
26
+ Requires-Dist: meshio; extra == "tests"
27
+ Provides-Extra: dev
28
+ Requires-Dist: pre-commit; extra == "dev"
29
+ Description-Content-Type: text/x-rst
30
+
31
+ pytetwild
32
+ #########
33
+
34
+ |pypi| |MPL|
35
+
36
+ .. |pypi| image:: https://img.shields.io/pypi/v/pytetwild.svg?logo=python&logoColor=white
37
+ :target: https://pypi.org/project/pytetwild/
38
+
39
+ .. |MPL| image:: https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg
40
+ :target: https://opensource.org/license/mpl-2-0
41
+
42
+ ``pytetwild`` is a Python library for mesh tetrahedralization. It is a
43
+ Python wrapper around the efficient C++ library for tetrahedral meshing provided by
44
+ `fTetWild <https://github.com/wildmeshing/fTetWild>`_.
45
+
46
+
47
+ Installation
48
+ ************
49
+
50
+ We have pre-built wheels for Python 3.10 - Python 3.14 for Windows, Linux, and macOS.
51
+
52
+ The recommended way to install ``pytetwild`` is via PyPI:
53
+
54
+ .. code:: sh
55
+
56
+ pip install pytetwild[all]
57
+
58
+ This installs ``pyvista`` by default, which you can use to tetrahedralize
59
+ sufrace meshes from PyVista. Alternatively you can just install with ``pip
60
+ install pytetwild`` for a lighter install.
61
+
62
+ You can also clone the repository and install it from source, but since there's
63
+ C++ involved, the build is a bit more complicated. See ``CONTRIBUTING.md`` for
64
+ more details.
65
+
66
+
67
+ Usage
68
+ *****
69
+
70
+ To tetrahedralize a surface mesh from `PyVista <https://docs.pyvista.org>`_,
71
+ you'll need to first install ``pyvista`` as it's not a dependency and then run:
72
+
73
+ .. code:: py
74
+
75
+ import pyvista as pv
76
+ import pytetwild
77
+
78
+ # Load or create a PyVista PolyData surface mesh
79
+ # Here, we'll create a simple sphere mesh as an example
80
+ surface_mesh = pv.Icosphere(nsub=2)
81
+
82
+ # Convert the surface mesh to a tetrahedral mesh. For this example let's
83
+ # use a coarse mesh
84
+ tetrahedral_mesh = pytetwild.tetrahedralize_pv(surface_mesh, edge_length_fac=1)
85
+
86
+ # Visualize the tetrahedral mesh in an "exploded" view
87
+ tetrahedral_mesh.explode(0.5).plot(
88
+ show_edges=True, zoom=1.6, ssao=True, anti_aliasing="ssaa"
89
+ )
90
+
91
+
92
+ .. image:: https://github.com/pyvista/pytetwild/raw/main/exploded-sphere.png
93
+
94
+ You can also work with raw arrays. Here's a simple cube that we turn into tetrahedra.
95
+
96
+ .. code:: py
97
+
98
+ import numpy as np
99
+ import pytetwild
100
+
101
+ # Define vertices of the cube
102
+ vertices = np.array([
103
+ [0, 0, 0], # Vertex 0
104
+ [1, 0, 0], # Vertex 1
105
+ [1, 1, 0], # Vertex 2
106
+ [0, 1, 0], # Vertex 3
107
+ [0, 0, 1], # Vertex 4
108
+ [1, 0, 1], # Vertex 5
109
+ [1, 1, 1], # Vertex 6
110
+ [0, 1, 1] # Vertex 7
111
+ ])
112
+
113
+ # Define faces using vertex indices
114
+ # Each face is a rectangle (also accepts triangles)
115
+ faces = np.array([
116
+ [0, 1, 2, 3], # Front face
117
+ [1, 5, 6, 2], # Right face
118
+ [5, 4, 7, 6], # Back face
119
+ [4, 0, 3, 7], # Left face
120
+ [4, 5, 1, 0], # Bottom face
121
+ [3, 2, 6, 7] # Top face
122
+ ])
123
+ v_out, tetra = pytetwild.tetrahedralize(vertices, faces, optimize=False)
124
+
125
+
126
+ Usage - Options
127
+ ---------------
128
+ We've surfaced a several parameters to each of our interfaces
129
+ ``tetrahedralize`` and ``tetrahedralize_pv``:
130
+
131
+ .. code::
132
+
133
+ Parameters
134
+ ----------
135
+ edge_length_fac : float, default: 0.05
136
+ Tetrahedral edge length as a function of bounding box diagonal. The
137
+ default ideal edge length is ``bb/20`` (bounding box divided by
138
+ 20). Ignored when ``edge_length_abs`` is input.
139
+ edge_length_abs : float, optional
140
+ Absolute ideal edge length. When input ``edge_length_fac`` is ignored.
141
+ optimize : bool, default: True
142
+ Improve the minimum scaled Jacobean for each cell. This leads to higher
143
+ cell quality at the expense of computation time. Optimization level is
144
+ dependent on ``stop_energy`` and ``num_opt_iter``.
145
+ simplify : bool, default: True
146
+ Simplfiy the input mesh surface before tetrahedralization.
147
+ epsilon : float, default 1e-3
148
+ Envelop size, specifying the maximum distance of the output surface
149
+ from the input surface, relative to the bounding box size.
150
+ stop_energy : float, default: 10.0
151
+ The mesh optimization stops when the conformal AMIPS energy reaches
152
+ ``stop_energy``.
153
+ coarsen : bool, default: False
154
+ Coarsen the output as much as possible, while maintaining the mesh
155
+ quality.
156
+ num_threads : int, default: 0
157
+ Set number of threads used. 0 (default) uses all available cores.
158
+ num_opt_iter : int, default: 80
159
+ Maximum number of optimization iterations if ``optimize=True``.
160
+ loglevel : int, default: 6
161
+ Set log level (0 = most verbose, 6 = minimal output).
162
+ quiet : bool, default: False
163
+ Disable all output. Overrides ``loglevel``.
164
+
165
+
166
+
167
+ License and Acknowledgments
168
+ ***************************
169
+
170
+ This project relies on ``fTetWild`` and credit goes to the original authors for
171
+ their efficient C++ library for tetrahedral meshing. That work is licensed
172
+ under the Mozilla Public License v2.0.
173
+
174
+ The work in this repository is also licensed under the Mozilla Public License v2.0.
175
+
176
+ Support
177
+ *******
178
+
179
+ If you are having issues, please feel free to raise an `Issue
180
+ <https://github.com/pyvista/pytetwild/issues>`_.
@@ -0,0 +1,11 @@
1
+ pytetwild-0.2.0.dist-info/RECORD,,
2
+ pytetwild-0.2.0.dist-info/WHEEL,sha256=ey3_uyy1pWvl1IpjcRt2cRv6ml15QL5BcDDgLyUtWkg,141
3
+ pytetwild-0.2.0.dist-info/METADATA,sha256=W2TWaKZlnSapb1l0vwV4nvbPQNiaPd76VdoaEm1hdFI,6131
4
+ pytetwild-0.2.0.dist-info/licenses/LICENSE,sha256=S4nUUYvRNatO4VSnvOciJGtXqYw9fvwaCUCYmBYMK9E,16724
5
+ pytetwild/PyfTetWildWrapper.abi3.so,sha256=l4hck_CwqjXHUOQ02kzTpHz4-EmvkPspGzdo-ISx8RA,6779616
6
+ pytetwild/_version.py,sha256=qDxTMPS7diuO_YwLR1aF11vCH9c4gjMocv2O7QB-wFk,115
7
+ pytetwild/__init__.py,sha256=uIyInmpybLC_OCJyr2yYVcdp0WxweLudksNqKvOijpY,168
8
+ pytetwild/pytetwild.py,sha256=vnrEwAXcn31M5FSedtog4h1_VHj3C-oXLdZY-Xt-rN4,12236
9
+ pytetwild/py.typed,sha256=mDShSrm8qg9qjacQc2F-rI8ATllqP6EdgHuEYxuCXZ0,7
10
+ pytetwild/PyfTetWildWrapper.pyi,sha256=774Qi5gUvNBF8oMEliEA4304LeUC9JKOioHM-HVSpyQ,740
11
+ pytetwild/.dylibs/libgmp.10.dylib,sha256=Y0mnXhEhmmZ7tf0TzjEQPnFZQJ7vfVGBgQJfVeSak_8,440864
@@ -0,0 +1,6 @@
1
+ Wheel-Version: 1.0
2
+ Generator: scikit-build-core 0.11.6
3
+ Root-Is-Purelib: false
4
+ Tag: cp312-abi3-macosx_15_0_x86_64
5
+ Generator: delocate 0.13.0
6
+
@@ -0,0 +1,373 @@
1
+ Mozilla Public License Version 2.0
2
+ ==================================
3
+
4
+ 1. Definitions
5
+ --------------
6
+
7
+ 1.1. "Contributor"
8
+ means each individual or legal entity that creates, contributes to
9
+ the creation of, or owns Covered Software.
10
+
11
+ 1.2. "Contributor Version"
12
+ means the combination of the Contributions of others (if any) used
13
+ by a Contributor and that particular Contributor's Contribution.
14
+
15
+ 1.3. "Contribution"
16
+ means Covered Software of a particular Contributor.
17
+
18
+ 1.4. "Covered Software"
19
+ means Source Code Form to which the initial Contributor has attached
20
+ the notice in Exhibit A, the Executable Form of such Source Code
21
+ Form, and Modifications of such Source Code Form, in each case
22
+ including portions thereof.
23
+
24
+ 1.5. "Incompatible With Secondary Licenses"
25
+ means
26
+
27
+ (a) that the initial Contributor has attached the notice described
28
+ in Exhibit B to the Covered Software; or
29
+
30
+ (b) that the Covered Software was made available under the terms of
31
+ version 1.1 or earlier of the License, but not also under the
32
+ terms of a Secondary License.
33
+
34
+ 1.6. "Executable Form"
35
+ means any form of the work other than Source Code Form.
36
+
37
+ 1.7. "Larger Work"
38
+ means a work that combines Covered Software with other material, in
39
+ a separate file or files, that is not Covered Software.
40
+
41
+ 1.8. "License"
42
+ means this document.
43
+
44
+ 1.9. "Licensable"
45
+ means having the right to grant, to the maximum extent possible,
46
+ whether at the time of the initial grant or subsequently, any and
47
+ all of the rights conveyed by this License.
48
+
49
+ 1.10. "Modifications"
50
+ means any of the following:
51
+
52
+ (a) any file in Source Code Form that results from an addition to,
53
+ deletion from, or modification of the contents of Covered
54
+ Software; or
55
+
56
+ (b) any new file in Source Code Form that contains any Covered
57
+ Software.
58
+
59
+ 1.11. "Patent Claims" of a Contributor
60
+ means any patent claim(s), including without limitation, method,
61
+ process, and apparatus claims, in any patent Licensable by such
62
+ Contributor that would be infringed, but for the grant of the
63
+ License, by the making, using, selling, offering for sale, having
64
+ made, import, or transfer of either its Contributions or its
65
+ Contributor Version.
66
+
67
+ 1.12. "Secondary License"
68
+ means either the GNU General Public License, Version 2.0, the GNU
69
+ Lesser General Public License, Version 2.1, the GNU Affero General
70
+ Public License, Version 3.0, or any later versions of those
71
+ licenses.
72
+
73
+ 1.13. "Source Code Form"
74
+ means the form of the work preferred for making modifications.
75
+
76
+ 1.14. "You" (or "Your")
77
+ means an individual or a legal entity exercising rights under this
78
+ License. For legal entities, "You" includes any entity that
79
+ controls, is controlled by, or is under common control with You. For
80
+ purposes of this definition, "control" means (a) the power, direct
81
+ or indirect, to cause the direction or management of such entity,
82
+ whether by contract or otherwise, or (b) ownership of more than
83
+ fifty percent (50%) of the outstanding shares or beneficial
84
+ ownership of such entity.
85
+
86
+ 2. License Grants and Conditions
87
+ --------------------------------
88
+
89
+ 2.1. Grants
90
+
91
+ Each Contributor hereby grants You a world-wide, royalty-free,
92
+ non-exclusive license:
93
+
94
+ (a) under intellectual property rights (other than patent or trademark)
95
+ Licensable by such Contributor to use, reproduce, make available,
96
+ modify, display, perform, distribute, and otherwise exploit its
97
+ Contributions, either on an unmodified basis, with Modifications, or
98
+ as part of a Larger Work; and
99
+
100
+ (b) under Patent Claims of such Contributor to make, use, sell, offer
101
+ for sale, have made, import, and otherwise transfer either its
102
+ Contributions or its Contributor Version.
103
+
104
+ 2.2. Effective Date
105
+
106
+ The licenses granted in Section 2.1 with respect to any Contribution
107
+ become effective for each Contribution on the date the Contributor first
108
+ distributes such Contribution.
109
+
110
+ 2.3. Limitations on Grant Scope
111
+
112
+ The licenses granted in this Section 2 are the only rights granted under
113
+ this License. No additional rights or licenses will be implied from the
114
+ distribution or licensing of Covered Software under this License.
115
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
116
+ Contributor:
117
+
118
+ (a) for any code that a Contributor has removed from Covered Software;
119
+ or
120
+
121
+ (b) for infringements caused by: (i) Your and any other third party's
122
+ modifications of Covered Software, or (ii) the combination of its
123
+ Contributions with other software (except as part of its Contributor
124
+ Version); or
125
+
126
+ (c) under Patent Claims infringed by Covered Software in the absence of
127
+ its Contributions.
128
+
129
+ This License does not grant any rights in the trademarks, service marks,
130
+ or logos of any Contributor (except as may be necessary to comply with
131
+ the notice requirements in Section 3.4).
132
+
133
+ 2.4. Subsequent Licenses
134
+
135
+ No Contributor makes additional grants as a result of Your choice to
136
+ distribute the Covered Software under a subsequent version of this
137
+ License (see Section 10.2) or under the terms of a Secondary License (if
138
+ permitted under the terms of Section 3.3).
139
+
140
+ 2.5. Representation
141
+
142
+ Each Contributor represents that the Contributor believes its
143
+ Contributions are its original creation(s) or it has sufficient rights
144
+ to grant the rights to its Contributions conveyed by this License.
145
+
146
+ 2.6. Fair Use
147
+
148
+ This License is not intended to limit any rights You have under
149
+ applicable copyright doctrines of fair use, fair dealing, or other
150
+ equivalents.
151
+
152
+ 2.7. Conditions
153
+
154
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
155
+ in Section 2.1.
156
+
157
+ 3. Responsibilities
158
+ -------------------
159
+
160
+ 3.1. Distribution of Source Form
161
+
162
+ All distribution of Covered Software in Source Code Form, including any
163
+ Modifications that You create or to which You contribute, must be under
164
+ the terms of this License. You must inform recipients that the Source
165
+ Code Form of the Covered Software is governed by the terms of this
166
+ License, and how they can obtain a copy of this License. You may not
167
+ attempt to alter or restrict the recipients' rights in the Source Code
168
+ Form.
169
+
170
+ 3.2. Distribution of Executable Form
171
+
172
+ If You distribute Covered Software in Executable Form then:
173
+
174
+ (a) such Covered Software must also be made available in Source Code
175
+ Form, as described in Section 3.1, and You must inform recipients of
176
+ the Executable Form how they can obtain a copy of such Source Code
177
+ Form by reasonable means in a timely manner, at a charge no more
178
+ than the cost of distribution to the recipient; and
179
+
180
+ (b) You may distribute such Executable Form under the terms of this
181
+ License, or sublicense it under different terms, provided that the
182
+ license for the Executable Form does not attempt to limit or alter
183
+ the recipients' rights in the Source Code Form under this License.
184
+
185
+ 3.3. Distribution of a Larger Work
186
+
187
+ You may create and distribute a Larger Work under terms of Your choice,
188
+ provided that You also comply with the requirements of this License for
189
+ the Covered Software. If the Larger Work is a combination of Covered
190
+ Software with a work governed by one or more Secondary Licenses, and the
191
+ Covered Software is not Incompatible With Secondary Licenses, this
192
+ License permits You to additionally distribute such Covered Software
193
+ under the terms of such Secondary License(s), so that the recipient of
194
+ the Larger Work may, at their option, further distribute the Covered
195
+ Software under the terms of either this License or such Secondary
196
+ License(s).
197
+
198
+ 3.4. Notices
199
+
200
+ You may not remove or alter the substance of any license notices
201
+ (including copyright notices, patent notices, disclaimers of warranty,
202
+ or limitations of liability) contained within the Source Code Form of
203
+ the Covered Software, except that You may alter any license notices to
204
+ the extent required to remedy known factual inaccuracies.
205
+
206
+ 3.5. Application of Additional Terms
207
+
208
+ You may choose to offer, and to charge a fee for, warranty, support,
209
+ indemnity or liability obligations to one or more recipients of Covered
210
+ Software. However, You may do so only on Your own behalf, and not on
211
+ behalf of any Contributor. You must make it absolutely clear that any
212
+ such warranty, support, indemnity, or liability obligation is offered by
213
+ You alone, and You hereby agree to indemnify every Contributor for any
214
+ liability incurred by such Contributor as a result of warranty, support,
215
+ indemnity or liability terms You offer. You may include additional
216
+ disclaimers of warranty and limitations of liability specific to any
217
+ jurisdiction.
218
+
219
+ 4. Inability to Comply Due to Statute or Regulation
220
+ ---------------------------------------------------
221
+
222
+ If it is impossible for You to comply with any of the terms of this
223
+ License with respect to some or all of the Covered Software due to
224
+ statute, judicial order, or regulation then You must: (a) comply with
225
+ the terms of this License to the maximum extent possible; and (b)
226
+ describe the limitations and the code they affect. Such description must
227
+ be placed in a text file included with all distributions of the Covered
228
+ Software under this License. Except to the extent prohibited by statute
229
+ or regulation, such description must be sufficiently detailed for a
230
+ recipient of ordinary skill to be able to understand it.
231
+
232
+ 5. Termination
233
+ --------------
234
+
235
+ 5.1. The rights granted under this License will terminate automatically
236
+ if You fail to comply with any of its terms. However, if You become
237
+ compliant, then the rights granted under this License from a particular
238
+ Contributor are reinstated (a) provisionally, unless and until such
239
+ Contributor explicitly and finally terminates Your grants, and (b) on an
240
+ ongoing basis, if such Contributor fails to notify You of the
241
+ non-compliance by some reasonable means prior to 60 days after You have
242
+ come back into compliance. Moreover, Your grants from a particular
243
+ Contributor are reinstated on an ongoing basis if such Contributor
244
+ notifies You of the non-compliance by some reasonable means, this is the
245
+ first time You have received notice of non-compliance with this License
246
+ from such Contributor, and You become compliant prior to 30 days after
247
+ Your receipt of the notice.
248
+
249
+ 5.2. If You initiate litigation against any entity by asserting a patent
250
+ infringement claim (excluding declaratory judgment actions,
251
+ counter-claims, and cross-claims) alleging that a Contributor Version
252
+ directly or indirectly infringes any patent, then the rights granted to
253
+ You by any and all Contributors for the Covered Software under Section
254
+ 2.1 of this License shall terminate.
255
+
256
+ 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
257
+ end user license agreements (excluding distributors and resellers) which
258
+ have been validly granted by You or Your distributors under this License
259
+ prior to termination shall survive termination.
260
+
261
+ ************************************************************************
262
+ * *
263
+ * 6. Disclaimer of Warranty *
264
+ * ------------------------- *
265
+ * *
266
+ * Covered Software is provided under this License on an "as is" *
267
+ * basis, without warranty of any kind, either expressed, implied, or *
268
+ * statutory, including, without limitation, warranties that the *
269
+ * Covered Software is free of defects, merchantable, fit for a *
270
+ * particular purpose or non-infringing. The entire risk as to the *
271
+ * quality and performance of the Covered Software is with You. *
272
+ * Should any Covered Software prove defective in any respect, You *
273
+ * (not any Contributor) assume the cost of any necessary servicing, *
274
+ * repair, or correction. This disclaimer of warranty constitutes an *
275
+ * essential part of this License. No use of any Covered Software is *
276
+ * authorized under this License except under this disclaimer. *
277
+ * *
278
+ ************************************************************************
279
+
280
+ ************************************************************************
281
+ * *
282
+ * 7. Limitation of Liability *
283
+ * -------------------------- *
284
+ * *
285
+ * Under no circumstances and under no legal theory, whether tort *
286
+ * (including negligence), contract, or otherwise, shall any *
287
+ * Contributor, or anyone who distributes Covered Software as *
288
+ * permitted above, be liable to You for any direct, indirect, *
289
+ * special, incidental, or consequential damages of any character *
290
+ * including, without limitation, damages for lost profits, loss of *
291
+ * goodwill, work stoppage, computer failure or malfunction, or any *
292
+ * and all other commercial damages or losses, even if such party *
293
+ * shall have been informed of the possibility of such damages. This *
294
+ * limitation of liability shall not apply to liability for death or *
295
+ * personal injury resulting from such party's negligence to the *
296
+ * extent applicable law prohibits such limitation. Some *
297
+ * jurisdictions do not allow the exclusion or limitation of *
298
+ * incidental or consequential damages, so this exclusion and *
299
+ * limitation may not apply to You. *
300
+ * *
301
+ ************************************************************************
302
+
303
+ 8. Litigation
304
+ -------------
305
+
306
+ Any litigation relating to this License may be brought only in the
307
+ courts of a jurisdiction where the defendant maintains its principal
308
+ place of business and such litigation shall be governed by laws of that
309
+ jurisdiction, without reference to its conflict-of-law provisions.
310
+ Nothing in this Section shall prevent a party's ability to bring
311
+ cross-claims or counter-claims.
312
+
313
+ 9. Miscellaneous
314
+ ----------------
315
+
316
+ This License represents the complete agreement concerning the subject
317
+ matter hereof. If any provision of this License is held to be
318
+ unenforceable, such provision shall be reformed only to the extent
319
+ necessary to make it enforceable. Any law or regulation which provides
320
+ that the language of a contract shall be construed against the drafter
321
+ shall not be used to construe this License against a Contributor.
322
+
323
+ 10. Versions of the License
324
+ ---------------------------
325
+
326
+ 10.1. New Versions
327
+
328
+ Mozilla Foundation is the license steward. Except as provided in Section
329
+ 10.3, no one other than the license steward has the right to modify or
330
+ publish new versions of this License. Each version will be given a
331
+ distinguishing version number.
332
+
333
+ 10.2. Effect of New Versions
334
+
335
+ You may distribute the Covered Software under the terms of the version
336
+ of the License under which You originally received the Covered Software,
337
+ or under the terms of any subsequent version published by the license
338
+ steward.
339
+
340
+ 10.3. Modified Versions
341
+
342
+ If you create software not governed by this License, and you want to
343
+ create a new license for such software, you may create and use a
344
+ modified version of this License if you rename the license and remove
345
+ any references to the name of the license steward (except to note that
346
+ such modified license differs from this License).
347
+
348
+ 10.4. Distributing Source Code Form that is Incompatible With Secondary
349
+ Licenses
350
+
351
+ If You choose to distribute Source Code Form that is Incompatible With
352
+ Secondary Licenses under the terms of this version of the License, the
353
+ notice described in Exhibit B of this License must be attached.
354
+
355
+ Exhibit A - Source Code Form License Notice
356
+ -------------------------------------------
357
+
358
+ This Source Code Form is subject to the terms of the Mozilla Public
359
+ License, v. 2.0. If a copy of the MPL was not distributed with this
360
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
361
+
362
+ If it is not possible or desirable to put the notice in a particular
363
+ file, then You may include the notice in a location (such as a LICENSE
364
+ file in a relevant directory) where a recipient would be likely to look
365
+ for such a notice.
366
+
367
+ You may add additional accurate notices of copyright ownership.
368
+
369
+ Exhibit B - "Incompatible With Secondary Licenses" Notice
370
+ ---------------------------------------------------------
371
+
372
+ This Source Code Form is "Incompatible With Secondary Licenses", as
373
+ defined by the Mozilla Public License, v. 2.0.