pytetwild 0.2.2__tar.gz → 0.2.3__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.
Files changed (116) hide show
  1. {pytetwild-0.2.2 → pytetwild-0.2.3}/PKG-INFO +1 -1
  2. {pytetwild-0.2.2 → pytetwild-0.2.3}/pyproject.toml +1 -1
  3. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/FTetWildWrapper.cpp +3 -1
  4. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/pytetwild/PyfTetWildWrapper.pyi +1 -0
  5. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/pytetwild/pytetwild.py +10 -0
  6. {pytetwild-0.2.2 → pytetwild-0.2.3}/tests/test_pytetwild.py +14 -0
  7. {pytetwild-0.2.2 → pytetwild-0.2.3}/.clang-format +0 -0
  8. {pytetwild-0.2.2 → pytetwild-0.2.3}/.github/workflows/build-and-deploy.yml +0 -0
  9. {pytetwild-0.2.2 → pytetwild-0.2.3}/.gitignore +0 -0
  10. {pytetwild-0.2.2 → pytetwild-0.2.3}/.gitmodules +0 -0
  11. {pytetwild-0.2.2 → pytetwild-0.2.3}/.pre-commit-config.yaml +0 -0
  12. {pytetwild-0.2.2 → pytetwild-0.2.3}/CMakeLists.txt +0 -0
  13. {pytetwild-0.2.2 → pytetwild-0.2.3}/CONTRIBUTING.md +0 -0
  14. {pytetwild-0.2.2 → pytetwild-0.2.3}/LICENSE +0 -0
  15. {pytetwild-0.2.2 → pytetwild-0.2.3}/README.rst +0 -0
  16. {pytetwild-0.2.2 → pytetwild-0.2.3}/exploded-sphere.png +0 -0
  17. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/array_support.h +0 -0
  18. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/.clang-format +0 -0
  19. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/.github/workflows/continuous.yml +0 -0
  20. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/.gitignore +0 -0
  21. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/.travis.yml +0 -0
  22. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/CMakeLists.txt +0 -0
  23. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/LICENSE.MPL2 +0 -0
  24. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/README.md +0 -0
  25. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/cmake/DownloadProject.CMakeLists.cmake.in +0 -0
  26. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/cmake/DownloadProject.cmake +0 -0
  27. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/cmake/FindGMPfTetWild.cmake +0 -0
  28. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/cmake/FindMPFR.cmake +0 -0
  29. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/cmake/FloatTetwildDependencies.cmake +0 -0
  30. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/cmake/FloatTetwildUtils.cmake +0 -0
  31. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/cmake/PrependCurrentPath.cmake +0 -0
  32. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/cmake/UseColors.cmake +0 -0
  33. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/cmake/Warnings.cmake +0 -0
  34. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/cmake/geogram.cmake +0 -0
  35. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/figs/1k.jpg +0 -0
  36. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/python/generate-table-code.py +0 -0
  37. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/python/plot-tet.py +0 -0
  38. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/python/save_all_confs.py +0 -0
  39. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/replicability_instructions.htm +0 -0
  40. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/AABBWrapper.cpp +0 -0
  41. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/AABBWrapper.h +0 -0
  42. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/CMakeLists.txt +0 -0
  43. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/CSGTreeParser.cpp +0 -0
  44. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/CSGTreeParser.hpp +0 -0
  45. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/CutMesh.cpp +0 -0
  46. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/CutMesh.h +0 -0
  47. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/EdgeCollapsing.cpp +0 -0
  48. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/EdgeCollapsing.h +0 -0
  49. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/EdgeSplitting.cpp +0 -0
  50. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/EdgeSplitting.h +0 -0
  51. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/EdgeSwapping.cpp +0 -0
  52. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/EdgeSwapping.h +0 -0
  53. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/FloatTetDelaunay.cpp +0 -0
  54. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/FloatTetDelaunay.h +0 -0
  55. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/FloatTetwild.cpp +0 -0
  56. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/FloatTetwild.h +0 -0
  57. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/LocalOperations.cpp +0 -0
  58. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/LocalOperations.h +0 -0
  59. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/Logger.cpp +0 -0
  60. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/Logger.hpp +0 -0
  61. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/Mesh.cpp +0 -0
  62. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/Mesh.hpp +0 -0
  63. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/MeshIO.cpp +0 -0
  64. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/MeshIO.hpp +0 -0
  65. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/MeshImprovement.cpp +0 -0
  66. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/MeshImprovement.h +0 -0
  67. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/Parameters.h +0 -0
  68. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/Simplification.cpp +0 -0
  69. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/Simplification.h +0 -0
  70. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/Statistics.h +0 -0
  71. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/TriangleInsertion.cpp +0 -0
  72. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/TriangleInsertion.h +0 -0
  73. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/Types.hpp +0 -0
  74. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/VertexSmoothing.cpp +0 -0
  75. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/VertexSmoothing.h +0 -0
  76. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/auto_table.cpp +0 -0
  77. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/auto_table.hpp +0 -0
  78. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/CMakeLists.txt +0 -0
  79. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/Exception.h +0 -0
  80. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/MshLoader.cpp +0 -0
  81. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/MshLoader.h +0 -0
  82. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/MshSaver.cpp +0 -0
  83. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/MshSaver.h +0 -0
  84. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/Predicates.cpp +0 -0
  85. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/Predicates.hpp +0 -0
  86. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/Rational.h +0 -0
  87. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/bfs_orient.cpp +0 -0
  88. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/bfs_orient.h +0 -0
  89. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/getRSS.c +0 -0
  90. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/get_mem.cpp +0 -0
  91. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/get_mem.h +0 -0
  92. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/mesh_AABB.cpp +0 -0
  93. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/mesh_AABB.h +0 -0
  94. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/predicates.c +0 -0
  95. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/triangle_triangle_intersection.cpp +0 -0
  96. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/external/triangle_triangle_intersection_old.cpp +0 -0
  97. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/intersections.cpp +0 -0
  98. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/intersections.h +0 -0
  99. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/src/main.cpp +0 -0
  100. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/tests/CMakeLists.txt +0 -0
  101. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/tests/bunny.off +0 -0
  102. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/tests/main.cpp +0 -0
  103. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/tests/test_predicates.cpp +0 -0
  104. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/tests/test_subdivision.cpp +0 -0
  105. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/tests/test_table.cpp +0 -0
  106. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/tests/test_tree.cpp +0 -0
  107. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/fTetWild/tests/tests.cpp +0 -0
  108. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/pytetwild/__init__.py +0 -0
  109. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/pytetwild/_version.py +0 -0
  110. {pytetwild-0.2.2 → pytetwild-0.2.3}/src/pytetwild/py.typed +0 -0
  111. {pytetwild-0.2.2 → pytetwild-0.2.3}/tests/test_data/box.stl +0 -0
  112. {pytetwild-0.2.2 → pytetwild-0.2.3}/tests/test_data/sphere.stl +0 -0
  113. {pytetwild-0.2.2 → pytetwild-0.2.3}/tests/test_data/test_surf.ply +0 -0
  114. {pytetwild-0.2.2 → pytetwild-0.2.3}/tests/test_data/test_tets.msh +0 -0
  115. {pytetwild-0.2.2 → pytetwild-0.2.3}/tools/audit_wheel.sh +0 -0
  116. {pytetwild-0.2.2 → pytetwild-0.2.3}/tools/extract-deps.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pytetwild
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  Summary: Python wrapper of fTetWild
5
5
  Author-Email: Alex Kaszynski <akascap@gmail.com>
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -4,7 +4,7 @@ requires = ["scikit-build-core >=0.4.3", "nanobind >=1.3.2"]
4
4
 
5
5
  [project]
6
6
  name = "pytetwild"
7
- version = "0.2.2"
7
+ version = "0.2.3"
8
8
  description = "Python wrapper of fTetWild"
9
9
  readme = { file = "README.rst", content-type = "text/x-rst" }
10
10
  authors = [{ name = "Alex Kaszynski", email = "akascap@gmail.com" }]
@@ -138,7 +138,8 @@ nb::tuple Tetrahedralize(
138
138
  int num_opt_iter,
139
139
  int loglevel,
140
140
  bool quiet,
141
- bool vtk_ordering) {
141
+ bool vtk_ordering,
142
+ bool disable_filtering) {
142
143
  using namespace floatTetWild;
143
144
  using namespace Eigen;
144
145
  GEO::initialize();
@@ -203,6 +204,7 @@ nb::tuple Tetrahedralize(
203
204
  params.coarsen = coarsen;
204
205
  params.is_quiet = quiet;
205
206
  params.max_its = num_opt_iter;
207
+ params.disable_filtering = disable_filtering;
206
208
 
207
209
  if (!params.init(tree.get_sf_diag())) {
208
210
  throw std::runtime_error("FTetWildWrapper.cpp: Parameters initialization failed");
@@ -16,6 +16,7 @@ def tetrahedralize_mesh(
16
16
  loglevel: int,
17
17
  quiet: bool,
18
18
  vtk_ordering: bool,
19
+ disable_filtering: bool,
19
20
  ) -> tuple[NDArray[np.float64], NDArray[np.int32]]: ...
20
21
  def tetrahedralize_csg(
21
22
  csg_file: str,
@@ -101,6 +101,7 @@ def tetrahedralize_pv(
101
101
  num_opt_iter: int = 80,
102
102
  loglevel: int = 3,
103
103
  quiet: bool = True,
104
+ disable_filtering: bool = False,
104
105
  ) -> "pv.UnstructuredGrid":
105
106
  """
106
107
  Convert a PyVista surface mesh to a PyVista unstructured grid.
@@ -138,6 +139,9 @@ def tetrahedralize_pv(
138
139
  Set log level (0 = most verbose, 6 = minimal output).
139
140
  quiet : bool, default: False
140
141
  Disable all output. Overrides ``loglevel``.
142
+ disable_filtering : bool, default: False
143
+ Disable the filtering of the resulting mesh, and thus keep
144
+ fTetWilds background mesh.
141
145
 
142
146
  Returns
143
147
  -------
@@ -205,6 +209,7 @@ def tetrahedralize_pv(
205
209
  loglevel,
206
210
  quiet,
207
211
  vtk_ordering,
212
+ disable_filtering,
208
213
  )
209
214
  return _ugrid_from_regular_cells(tmesh_v, tmesh_c)
210
215
 
@@ -224,6 +229,7 @@ def tetrahedralize(
224
229
  loglevel: int = 3,
225
230
  quiet: bool = True,
226
231
  vtk_ordering: bool = False,
232
+ disable_filtering: bool = False,
227
233
  ) -> tuple[NDArray[np.float64], NDArray[np.int32]]:
228
234
  """
229
235
  Convert mesh vertices and faces to a tetrahedral mesh.
@@ -264,6 +270,9 @@ def tetrahedralize(
264
270
  Disable all output. Overrides ``loglevel``.
265
271
  vtk_ordering : bool, default: False
266
272
  Reorder the tetrahedral cell indices to match VTK's ordering.
273
+ disable_filtering : bool, default: False
274
+ Disable the filtering of the resulting mesh, and thus keep
275
+ fTetWilds background mesh.
267
276
 
268
277
  Returns
269
278
  -------
@@ -301,6 +310,7 @@ def tetrahedralize(
301
310
  loglevel,
302
311
  quiet,
303
312
  vtk_ordering,
313
+ disable_filtering,
304
314
  )
305
315
 
306
316
 
@@ -154,3 +154,17 @@ def test_csg() -> None:
154
154
 
155
155
  assert np.isclose(exactspherevol, spherevol, rtol=0.02)
156
156
  assert np.isclose(exactboxvol, boxvol, rtol=0.02)
157
+
158
+
159
+ def test_disable_filtering() -> None:
160
+ # test that the volume of a Unitbox is 1, and larger than 1.1 if the background is kept
161
+
162
+ box = pv.Box(bounds=(0, 1, 0, 1, 0, 1)).triangulate()
163
+ mesh_with_background = tetrahedralize_pv(box, disable_filtering=True)
164
+ mesh_wo_background = tetrahedralize_pv(box, disable_filtering=False)
165
+
166
+ vol_with_background = abs(mesh_with_background.compute_cell_sizes()["Volume"]).sum()
167
+ vol_wo_background = abs(mesh_wo_background.compute_cell_sizes()["Volume"]).sum()
168
+
169
+ assert np.isclose(vol_wo_background, 1.0, rtol=0.01)
170
+ assert vol_with_background > 1.1
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes