conquer3d 0.7.0__tar.gz → 0.7.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.
Files changed (163) hide show
  1. {conquer3d-0.7.0/conquer3d.egg-info → conquer3d-0.7.4}/PKG-INFO +158 -27
  2. {conquer3d-0.7.0 → conquer3d-0.7.4}/README.md +158 -27
  3. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/_C.so +0 -0
  4. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/conversion/tmesh.py +20 -5
  5. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/data_structure/grid.cpp +44 -0
  6. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/data_structure/triangle_mesh.cpp +1 -0
  7. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/data_structure/zcurve.cpp +8 -0
  8. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/ops/chamfer.cpp +14 -0
  9. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/ops/dc.cpp +22 -0
  10. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/ops/dmc.cpp +22 -0
  11. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/ops/flood_fill.cpp +14 -0
  12. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/ops/flood_fill_cf.cpp +14 -0
  13. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/ops/mc.cpp +22 -0
  14. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/ops/mca.cpp +22 -0
  15. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/ops/mt.cpp +22 -0
  16. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/ops/mtg.cpp +22 -0
  17. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/ops/volint.cpp +14 -0
  18. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/primitive/gs.cpp +24 -0
  19. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/primitive/pgs.cpp +8 -0
  20. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/primitive/ray.cpp +19 -0
  21. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/primitive/triangle.cpp +83 -3
  22. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/check.h +6 -0
  23. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/bvh.cu +205 -11
  24. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/bvh.h +1 -1
  25. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/grid.cu +59 -3
  26. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/kdtree.cu +78 -3
  27. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/mesh_bvh.cu +270 -7
  28. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/mesh_bvh.h +1 -1
  29. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/triangle_mesh.cu +599 -65
  30. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/triangle_mesh.h +93 -15
  31. conquer3d-0.7.4/conquer3d/csrc/data_structure/zcurve.cu +48 -0
  32. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/maths/f2x2.h +57 -1
  33. conquer3d-0.7.4/conquer3d/csrc/maths/f3x1.h +277 -0
  34. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/maths/f3x3.h +60 -1
  35. conquer3d-0.7.4/conquer3d/csrc/maths/f3x4.h +59 -0
  36. conquer3d-0.7.4/conquer3d/csrc/maths/f4x1.h +171 -0
  37. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/maths/f4x4.h +64 -1
  38. conquer3d-0.7.4/conquer3d/csrc/maths/ops.h +43 -0
  39. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/chamfer.cu +34 -0
  40. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/dc.cu +169 -0
  41. conquer3d-0.7.4/conquer3d/csrc/ops/dc_data.h +88 -0
  42. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/dmc.cu +155 -0
  43. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/dmc_data.h +77 -7
  44. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/flood_fill.cu +89 -2
  45. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/flood_fill_cf.cu +278 -9
  46. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/flood_fill_cf.h +9 -9
  47. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/mc.cu +265 -8
  48. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/mc_data.h +41 -0
  49. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/mca.cu +105 -2
  50. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/mca_data.h +29 -0
  51. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/mt.cu +253 -6
  52. conquer3d-0.7.4/conquer3d/csrc/ops/mt_data.h +105 -0
  53. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/mtg.cu +257 -6
  54. conquer3d-0.7.4/conquer3d/csrc/ops/mtg_data.h +89 -0
  55. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/volint.cu +36 -0
  56. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/edge.h +20 -0
  57. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/gs.cu +37 -2
  58. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/gs_aabb.cu +211 -4
  59. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/pgs.cu +22 -1
  60. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/pgs_aabb.cu +92 -2
  61. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/triangle.h +317 -1
  62. conquer3d-0.7.4/conquer3d/csrc/pybind.cpp +161 -0
  63. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/__init__.py +2 -1
  64. conquer3d-0.7.4/conquer3d/data/assets/common.py +580 -0
  65. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/dataset/__init__.py +2 -0
  66. conquer3d-0.7.4/conquer3d/data/dataset/digit3dmv.py +369 -0
  67. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data_structure/__init__.py +1 -1
  68. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/ops/__init__.py +3 -0
  69. conquer3d-0.7.4/conquer3d/ops/dpsr.py +300 -0
  70. conquer3d-0.7.4/conquer3d/ops/dual_contouring.py +178 -0
  71. conquer3d-0.7.4/conquer3d/ops/dual_marching_cubes.py +173 -0
  72. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/ops/marching_cubes_asymptotic.py +45 -67
  73. {conquer3d-0.7.0 → conquer3d-0.7.4/conquer3d.egg-info}/PKG-INFO +158 -27
  74. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d.egg-info/SOURCES.txt +2 -0
  75. {conquer3d-0.7.0 → conquer3d-0.7.4}/pyproject.toml +1 -1
  76. {conquer3d-0.7.0 → conquer3d-0.7.4}/setup.py +13 -8
  77. conquer3d-0.7.0/conquer3d/csrc/data_structure/zcurve.cu +0 -32
  78. conquer3d-0.7.0/conquer3d/csrc/maths/f3x1.h +0 -120
  79. conquer3d-0.7.0/conquer3d/csrc/maths/f3x4.h +0 -28
  80. conquer3d-0.7.0/conquer3d/csrc/maths/f4x1.h +0 -75
  81. conquer3d-0.7.0/conquer3d/csrc/maths/ops.h +0 -20
  82. conquer3d-0.7.0/conquer3d/csrc/ops/dc_data.h +0 -50
  83. conquer3d-0.7.0/conquer3d/csrc/ops/mt_data.h +0 -72
  84. conquer3d-0.7.0/conquer3d/csrc/ops/mtg_data.h +0 -60
  85. conquer3d-0.7.0/conquer3d/csrc/pybind.cpp +0 -62
  86. conquer3d-0.7.0/conquer3d/data/assets/common.py +0 -196
  87. conquer3d-0.7.0/conquer3d/ops/dual_contouring.py +0 -219
  88. conquer3d-0.7.0/conquer3d/ops/dual_marching_cubes.py +0 -213
  89. {conquer3d-0.7.0 → conquer3d-0.7.4}/LICENSE +0 -0
  90. {conquer3d-0.7.0 → conquer3d-0.7.4}/MANIFEST.in +0 -0
  91. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/_C.pyi +0 -0
  92. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/__init__.py +0 -0
  93. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/conversion/__init__.py +0 -0
  94. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/conversion/grid.py +0 -0
  95. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/conversion/mesh.py +0 -0
  96. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/creation/__init__.py +0 -0
  97. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/creation/triangle_creation.py +0 -0
  98. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/creation/triangle_creation.cpp +0 -0
  99. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/data_structure/bvh.cpp +0 -0
  100. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/data_structure/gs_bvh.cpp +0 -0
  101. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/data_structure/kdtree.cpp +0 -0
  102. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/data_structure/mesh_bvh.cpp +0 -0
  103. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/binds/data_structure/pgs_bvh.cpp +0 -0
  104. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/constants.h +0 -0
  105. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/creation/triangle_creation.h +0 -0
  106. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/grid.h +0 -0
  107. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/gs_bvh.h +0 -0
  108. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/kdtree.h +0 -0
  109. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/pgs_bvh.h +0 -0
  110. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/data_structure/zcurve.h +0 -0
  111. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/maths/maths.h +0 -0
  112. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/maths/qef.h +0 -0
  113. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/chamfer.h +0 -0
  114. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/dc.h +0 -0
  115. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/dmc.h +0 -0
  116. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/flood_fill.h +0 -0
  117. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/mc.h +0 -0
  118. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/mca.h +0 -0
  119. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/mt.h +0 -0
  120. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/mtg.h +0 -0
  121. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/ops/volint.h +0 -0
  122. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/aabb.h +0 -0
  123. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/gs.h +0 -0
  124. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/gs_math.cuh +0 -0
  125. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/pgs.h +0 -0
  126. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/pgs_math.cuh +0 -0
  127. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/csrc/primitive/ray.h +0 -0
  128. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/assets/__init__.py +0 -0
  129. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/assets/iphigenia.py +0 -0
  130. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/collate/__init__.py +0 -0
  131. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/collate/mesh.py +0 -0
  132. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/collate/sparse_tensor.py +0 -0
  133. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/dataset/base_mesh.py +0 -0
  134. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/dataset/digit3d.py +0 -0
  135. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/dataset/mesh.py +0 -0
  136. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/dataset/redwood.py +0 -0
  137. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/transform/__init__.py +0 -0
  138. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/transform/base.py +0 -0
  139. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/transform/ops.py +0 -0
  140. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data/transform/vertex.py +0 -0
  141. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data_structure/bmesh.py +0 -0
  142. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data_structure/grid.py +0 -0
  143. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/data_structure/sort.py +0 -0
  144. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/io/__init__.py +0 -0
  145. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/io/obj.py +0 -0
  146. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/io/off.py +0 -0
  147. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/io/ply.py +0 -0
  148. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/ops/delaunay_triangulation.py +0 -0
  149. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/ops/diff_marching_cubes.py +0 -0
  150. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/ops/diff_marching_tetrahedra_grid.py +0 -0
  151. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/ops/distance.py +0 -0
  152. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/ops/marching_cubes.py +0 -0
  153. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/ops/marching_tetrahedra.py +0 -0
  154. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/ops/marching_tetrahedra_grid.py +0 -0
  155. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/ops/volint.py +0 -0
  156. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/primitive/__init__.py +0 -0
  157. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/primitive/gs.py +0 -0
  158. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d/primitive/pgs.py +0 -0
  159. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d.egg-info/dependency_links.txt +0 -0
  160. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d.egg-info/not-zip-safe +0 -0
  161. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d.egg-info/requires.txt +0 -0
  162. {conquer3d-0.7.0 → conquer3d-0.7.4}/conquer3d.egg-info/top_level.txt +0 -0
  163. {conquer3d-0.7.0 → conquer3d-0.7.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: conquer3d
3
- Version: 0.7.0
3
+ Version: 0.7.4
4
4
  Summary: Geometric Cuda Tool Box
5
5
  Author-email: Do Hoang Khoi <khoido8899@gmail.com>
6
6
  License-Expression: MIT
@@ -37,40 +37,125 @@ Dynamic: license-file
37
37
 
38
38
  ### *High-Performance GPU-Accelerated Differentiable Geometry, Spatial Computing & Neural Rendering Toolbox*
39
39
 
40
+ [![Documentation](https://img.shields.io/badge/📖_Documentation-conquer3d-76B900?style=for-the-badge)](https://khoidoo.github.io/conquer3d/)
40
41
  [![PyPI Version](https://img.shields.io/pypi/v/conquer3d.svg?color=blue&style=for-the-badge)](https://pypi.org/project/conquer3d/)
41
42
  [![Docker Image](https://img.shields.io/badge/Docker-kohido%2Fconquer3d-2496ED?logo=docker&logoColor=white&style=for-the-badge)](https://hub.docker.com/r/kohido/conquer3d)
42
43
  [![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](LICENSE)
43
- [![Python Version](https://img.shields.io/badge/Python-3.9%20%7C%203.10%20%7C%203.11-3776AB?logo=python&logoColor=white&style=for-the-badge)](https://www.python.org/)
44
+
45
+ [![Python Version](https://img.shields.io/badge/Python-3.9%2B-3776AB?logo=python&logoColor=white&style=for-the-badge)](https://www.python.org/)
44
46
  [![CUDA](https://img.shields.io/badge/CUDA-12.0%2B-76B900?logo=nvidia&logoColor=white&style=for-the-badge)](https://developer.nvidia.com/cuda-toolkit)
47
+ [![PyTorch](https://img.shields.io/badge/PyTorch-2.0%2B-EE4C2C?logo=pytorch&logoColor=white&style=for-the-badge)](https://pytorch.org/)
48
+ [![API Coverage](https://img.shields.io/badge/API_docs-1018_symbols_·_100%25-76B900?style=for-the-badge)](https://khoidoo.github.io/conquer3d/api/index.html)
45
49
 
46
50
  <p align="center">
47
- <a href="#-features--highlights">Key Features</a> •
48
- <a href="#-benchmarks">Benchmarks</a> •
49
- <a href="#-quickstart-examples">Quickstart</a> •
51
+ <b><a href="https://khoidoo.github.io/conquer3d/">🌐 Website</a></b> •
52
+ <a href="https://khoidoo.github.io/conquer3d/documentation.html">Guide</a> •
53
+ <a href="https://khoidoo.github.io/conquer3d/api/index.html">API Reference</a> •
54
+ <a href="https://khoidoo.github.io/conquer3d/benchmarks.html">Benchmarks</a> •
50
55
  <a href="#-installation">Installation</a> •
51
- <a href="#-acknowledgements--references">References</a>
56
+ <a href="#-features--highlights">Features</a>
52
57
  </p>
53
58
 
54
59
  </div>
55
60
 
56
61
  ---
57
62
 
63
+ > [!NOTE]
64
+ > The API documentation and the [documentation website](https://khoidoo.github.io/conquer3d/)
65
+ > were written with [Claude](https://claude.ai/code). The library itself — every CUDA kernel,
66
+ > data structure and operator — is the author's own work.
67
+
68
+ ---
69
+
58
70
  ## 🌟 Overview
59
71
 
60
- **Conquer3D** is an ultra-fast, GPU-native computational geometry and differentiable spatial computing library engineered in **PyTorch and CUDA**. Designed from the ground up for 3D computer vision, generative AI, neural surface reconstruction, and differentiable rendering, **Conquer3D** delivers up to **~1.0 Billion faces/second** isosurface extraction, exact CAD sharp crease preservation, and memory-efficient spatial acceleration structures.
72
+ **Conquer3D** is an ultra-fast, GPU-native computational geometry and differentiable spatial computing library engineered in **PyTorch and CUDA**. Designed from the ground up for 3D computer vision, generative AI, neural surface reconstruction, and differentiable rendering, **Conquer3D** delivers up to **~1.3 Billion faces/second** isosurface extraction, exact CAD sharp crease preservation, and memory-efficient spatial acceleration structures.
73
+
74
+ Every operator consumes and produces PyTorch tensors **in place** — no host round-trip, no format conversion — so meshing a field is an operation *inside* a training step rather than a preprocessing stage around it.
75
+
76
+ ```bash
77
+ pip install -U conquer3d
78
+ ```
79
+
80
+ ```python
81
+ import torch
82
+ from conquer3d.data_structure import create_voxel_grid
83
+ from conquer3d.ops import dmc
84
+
85
+ grid_vertices, voxels, _ = create_voxel_grid(
86
+ grid_min=[-1.0] * 3, grid_max=[1.0] * 3, res=[64, 64, 64], device="cuda"
87
+ )
88
+
89
+ sdf = (torch.norm(grid_vertices, dim=-1) - 0.6).requires_grad_(True)
90
+ verts, faces = dmc(grid_vertices, voxels, sdf, iso=0.0)
91
+
92
+ verts.sum().backward() # gradients flow back into the field
93
+ ```
94
+
95
+ ---
96
+
97
+ ## 📖 Documentation
98
+
99
+ **Full documentation lives at [khoidoo.github.io/conquer3d](https://khoidoo.github.io/conquer3d/).**
100
+
101
+ | | |
102
+ | :--- | :--- |
103
+ | **[Showcase](https://khoidoo.github.io/conquer3d/)** | What the library is for, and how to start. |
104
+ | **[Documentation](https://khoidoo.github.io/conquer3d/documentation.html)** | Installation, core concepts, architecture, and worked pipelines. |
105
+ | **[API Reference](https://khoidoo.github.io/conquer3d/api/index.html)** | Every symbol, across seven tiers. |
106
+ | **[Benchmarks](https://khoidoo.github.io/conquer3d/benchmarks.html)** | Measured extraction throughput on real geometry. |
107
+ | **[About](https://khoidoo.github.io/conquer3d/about.html)** | Motivation and the research this builds on. |
108
+
109
+ The API reference does not stop at the Python surface. It descends through the pybind11 bindings and host dispatchers into the CUDA kernels themselves, the device helpers they call, and the inline math those are built from — **1018 symbols, fully documented**:
110
+
111
+ | Tier | Layer | Symbols |
112
+ | :--- | :--- | ---: |
113
+ | **T1** | Python API | 159 |
114
+ | **T2** | Native bindings (`conquer3d._C`) | 151 |
115
+ | **T3** | Host dispatchers & C++ declarations | 437 |
116
+ | **T4** | CUDA `__global__` kernels | 109 |
117
+ | **T5** | CUDA `__device__` helpers | 69 |
118
+ | **T6** | Inline math primitives | 65 |
119
+ | **T7** | `__constant__` topology tables | 28 |
120
+
121
+ ---
122
+
123
+ ## ⚡ Benchmarks
124
+
125
+ *Measured on **NVIDIA GeForce RTX 4090** (torch 2.8.0+cu128, CUDA 12.8) on the **Fandisk CAD model** at **$1024^3$ resolution** (5.15M active cells). Timed with CUDA events around the operator alone, median of 7 runs after 2 warm-ups:*
126
+
127
+ | Algorithm | Mesh Output | Extracted Vertices | Extracted Faces / Quads | Latency (ms) | Throughput |
128
+ | :--- | :--- | ---: | ---: | ---: | ---: |
129
+ | **DMC (pure quads)** | Pure Quads | 1,716,384 | 1,716,382 | **2.51 ms** | **684M faces/s** |
130
+ | **Dual Marching Cubes** | Triangles | 1,716,384 | 3,432,764 | **2.62 ms** | **1,311M faces/s** |
131
+ | MC Asymptotic | Triangles | 1,716,382 | 3,432,760 | 2.71 ms | 1,267M faces/s |
132
+ | Dual Contouring | Triangles | 1,716,384 | 3,432,764 | 3.88 ms | 884M faces/s |
133
+ | Marching Cubes | Triangles | 1,716,382 | 3,432,760 | 7.90 ms | 434M faces/s |
134
+ | Marching Tetrahedra | Triangles | 6,113,918 | 12,227,832 | 44.90 ms | 272M faces/s |
135
+
136
+ All figures are produced by `docs/_figures/make_benchmarks.py` and can be reproduced. Sign-mode costs, pipeline setup breakdown and memory scaling are on the **[benchmarks page](https://khoidoo.github.io/conquer3d/benchmarks.html)**.
61
137
 
62
138
  ---
63
139
 
64
140
  ## ✨ Features & Highlights
65
141
 
66
- ### 🔷 1. Isosurface Extraction & Meshing
67
- - **Dual Marching Cubes (`dmc`)**: High-throughput manifold surface extraction with pure quad $(Q, 4)$ or triangle $(F, 3)$ outputs (~1.0B faces/s).
142
+ <details open>
143
+ <summary><b>🔷 1. Isosurface Extraction &amp; Meshing</b></summary>
144
+ <br>
145
+
146
+ - **Dual Marching Cubes (`dmc`)**: High-throughput manifold surface extraction with pure quad $(Q, 4)$ or triangle $(F, 3)$ outputs (~1.3B faces/s measured).
68
147
  - **Dual Contouring (`dc`)**: Sharp CAD crease and mechanical corner preservation via GPU Quadratic Error Function (QEF) solving.
69
148
  - **Marching Cubes Asymptotic (`mca`)**: Decider-enhanced Marching Cubes resolving topological face ambiguities on-the-fly.
149
+ - **Differentiable Poisson Surface Reconstruction (`dpsr`, `DPSR`)**: Differentiable spectral Fourier Poisson indicator field solving directly from oriented point clouds.
70
150
  - **Differentiable Marching Cubes (`diff_marching_cubes`)**: PyTorch autograd gradient backpropagation through levelsets into SDF and color fields.
71
151
  - **Marching Tetrahedra (`marching_tetrahedra`, `marching_tetrahedra_grid`)**: Consistent isosurface extraction across unstructured meshes and regular cubic tetrahedral grids.
72
152
 
73
- ### 🚀 2. Hardware-Accelerated Spatial Acceleration
153
+ </details>
154
+
155
+ <details>
156
+ <summary><b>🚀 2. Hardware-Accelerated Spatial Acceleration</b></summary>
157
+ <br>
158
+
74
159
  - **Triangle Mesh BVH (`MeshBVH`)**: GPU Bounding Volume Hierarchy for fast ray intersections, point projections, and signed distance queries.
75
160
  - **Gaussian Splatting BVHs (`GSBVH`, `PGSBVH`)**: Spatial hierarchies specialized for 3D Gaussian Splatting and Periodic Gaussian Splatting.
76
161
  - **Radix Linear BVH (`BVH`)**: High-throughput parallel bounding volume hierarchy for generic 3D primitives.
@@ -78,45 +163,59 @@ Dynamic: license-file
78
163
  - **Morton Z-Curve Sorting (`z_curve_sort`)**: 64-bit Radix-sorted space-filling curve indexing for maximizing GPU cache locality.
79
164
  - **Volumetric 3D Flood Fill**: Fast GPU bitmask ray-boundary flood fill for sign evaluation across complex geometries.
80
165
 
81
- ### 🌐 3. Volumetric Grids & Surface Conversions
166
+ </details>
167
+
168
+ <details>
169
+ <summary><b>🌐 3. Volumetric Grids &amp; Surface Conversions</b></summary>
170
+ <br>
171
+
82
172
  - **Narrow-Band Sparse Voxel Grids (`create_voxel_grid_from_tmesh`)**: Direct surface-confined voxelization bypassing dense 3D memory.
83
173
  - **Multi-Mode Normal Field Generation**: On-the-fly extraction of exact CAD face normals (`mode=0`), smooth vertex normals (`mode=1`), or SDF gradients (`mode=2`).
84
174
  - **Mesh-to-Grid Pipelines (`tmesh2voxel`, `tmesh2sparse`)**: One-line conversion from 3D meshes to dense or sparse Signed Distance Fields.
85
175
  - **Depth-Map Surface Carving (`get_active_voxel_ids_from_depth`)**: Multi-view RGB-D depth image backprojection into active voxel grids.
86
176
  - **Sparse & Occupancy Conversions (`sparse_coo2dense_occ`, `dense_occ2sparse_coo`)**: Seamless conversion between sparse coordinate tensors and dense binary occupancy volumes.
87
177
 
88
- ### 🎨 4. Radiance Fields & Differentiable Primitives
178
+ </details>
179
+
180
+ <details>
181
+ <summary><b>🎨 4. Radiance Fields &amp; Differentiable Primitives</b></summary>
182
+ <br>
183
+
89
184
  - **3D Gaussian Splatting Primitives (`compute_gs_covi`, `compute_gs_aabb`)**: GPU-accelerated covariance matrices, Mahalanobis distances, and tight AABB computation.
90
185
  - **Periodic Gaussian Splatting (`solve_pgs_cluster_tangency_radius`)**: Spatial frequency-aware radiance field query operators.
91
186
  - **Geometric Primitive Structures (`Ray`, `Triangle`, `AABB`, `Edge`)**: Vectorized GPU ray tracing and collision primitives.
92
187
 
93
- ### 📐 5. Geometric Distances & Volume Integrals
188
+ </details>
189
+
190
+ <details>
191
+ <summary><b>📐 5. Geometric Distances &amp; Volume Integrals</b></summary>
192
+ <br>
193
+
94
194
  - **Exact Chamfer Distances (`chamfer_distance`, `one_sided_chamfer_distance`)**: Point-to-point and point-to-mesh geometric error evaluation.
95
195
  - **Exact Hausdorff Distances (`hausdorff_distance`, `one_sided_hausdorff_distance`)**: Maximum deviation metrics for surface fidelity assessment.
96
196
  - **Single-View Volume Integrals (`single_view_volume_integral`)**: Analytical divergence-theorem ray volume integration.
97
197
 
98
- ### 📦 6. 3D Data Loading, Augmentation & Collation
198
+ </details>
199
+
200
+ <details>
201
+ <summary><b>📦 6. 3D Data Loading, Augmentation &amp; Collation</b></summary>
202
+ <br>
203
+
99
204
  - **Benchmark 3D Datasets (`Digit3D`, `PointDigit3D`, `RedWood`, `MeshDataset`)**: Ready-to-use PyTorch dataset abstractions.
100
205
  - **Standard Benchmark 3D Assets (`conquer3d.data.assets`)**: One-click download & caching for Stanford Bunny, Armadillo, Dragon, Lucy, Happy Buddha, Spot, Cow, Teapot, Suzanne, Fandisk, Iphigenia, and more.
101
206
  - **Geometric Data Augmentations (`Rotation`, `Scale`, `RandomRotation`, `RandomScale`, `Sequence`, `MeshSequence`)**: Composable spatial transformation pipelines.
102
207
  - **Custom PyTorch Batch Collation (`bmesh_collate_fn`, `sparse_collate_fn`)**: Efficient handling of variable-sized meshes and sparse tensors in DataLoaders.
103
208
 
104
- ### 🛠️ 7. Procedural Generation & File I/O
105
- - **Procedural Mesh Generators (`create_sphere`, `create_tetrahedra`)**: Parametric geometric shape creation utilities.
106
- - **High-Performance Mesh I/O (`read_obj`, `write_obj`, `read_off`)**: Native loading and saving for vertices, faces, and vertex colors.
107
-
108
- ---
209
+ </details>
109
210
 
110
- ## ⚡ Benchmarks
211
+ <details>
212
+ <summary><b>🛠️ 7. Procedural Generation &amp; File I/O</b></summary>
213
+ <br>
111
214
 
112
- *Empirical extraction performance on **NVIDIA GeForce RTX 4090** on the **Fandisk CAD model** at **$1024^3$ resolution** (6.86M sparse vertices, 5.15M active voxels):*
215
+ - **Procedural Mesh Generators (`create_sphere`, `create_tetrahedra`)**: Parametric geometric shape creation utilities.
216
+ - **High-Performance Mesh I/O (`read_obj`, `write_obj`, `read_off`)**: Native loading and saving for vertices, faces, and vertex colors.
113
217
 
114
- | Algorithm | Mesh Output | Extracted Vertices | Extracted Faces / Quads | Latency (ms) | Throughput | Watertight |
115
- | :--- | :--- | :--- | :--- | :---: | :---: | :---: |
116
- | **Dual Marching Cubes (DMC)** | Triangles | **1,716,386** | **3,432,768** | **3.44 ms** | **~1.0B faces/s** | **Yes** |
117
- | **Dual Marching Cubes (DMC)** | Pure Quads | **1,716,386** | **1,716,384** | **3.22 ms** | **533M quads/s** | **Yes** |
118
- | **Dual Contouring (DC + Normals)** | Triangles | 1,716,386 | 3,432,768 | **4.79 ms** | **717M faces/s** | **Yes** |
119
- | **Marching Cubes Asymptotic (MCA)** | Triangles | 1,716,384 | 3,432,764 | 16.42 ms | **209M faces/s** | **Yes** |
218
+ </details>
120
219
 
121
220
  ---
122
221
 
@@ -189,6 +288,10 @@ query_ids, closest_tri_ids, projected_pts, sdfs = tmesh.query_points(
189
288
  )
190
289
  ```
191
290
 
291
+ > [!TIP]
292
+ > More worked pipelines, the core concepts behind them, and the full operator reference are on the
293
+ > **[documentation site](https://khoidoo.github.io/conquer3d/documentation.html)**.
294
+
192
295
  ---
193
296
 
194
297
  ## 📦 Installation
@@ -198,6 +301,8 @@ query_ids, closest_tri_ids, projected_pts, sdfs = tmesh.query_points(
198
301
  pip install -U conquer3d
199
302
  ```
200
303
 
304
+ Prebuilt CUDA wheels are attached to each release for **Python 3.10–3.14** against **PyTorch 2.8 and 2.11** (CUDA 12.8).
305
+
201
306
  ### 2. Docker (Recommended for instant GPU / CUDA environment)
202
307
  ```bash
203
308
  # Pull and run the pre-built image
@@ -228,16 +333,42 @@ cd conquer3d
228
333
  pip install -e . --no-build-isolation
229
334
  ```
230
335
 
336
+ > [!NOTE]
337
+ > Importing `conquer3d` loads the compiled `_C` extension at module scope, so a CUDA-capable device
338
+ > and a matching PyTorch build are required.
339
+
231
340
  ---
232
341
 
233
342
  ## 📚 Acknowledgements & References
343
+
234
344
  For further theoretical background, GPU collision detection guides, and related literature, please visit:
345
+
235
346
  - **[Research Papers](acknowledgement/REFERENCE.md)**: Computational geometry, differential topology, and acceleration structure foundations.
236
347
  - **[Blog Posts](acknowledgement/BLOG_POST.md)**: GPU spatial traversal, parallel BVH construction, and CUDA optimization guides.
237
348
  - **[Related Repositories](acknowledgement/REPOSITORY.md)**: Open-source geometric deep learning ecosystem.
238
349
  - **[Books](acknowledgement/BOOK.md)**: Core computational geometry references.
239
350
 
351
+ A rendered bibliography is also available on the **[About page](https://khoidoo.github.io/conquer3d/about.html)**.
352
+
353
+ ---
354
+
355
+ ## 📝 Citation
356
+
357
+ ```bibtex
358
+ @software{conquer3d,
359
+ title = {Conquer3D: GPU-Accelerated Differentiable Geometry and Spatial Computing},
360
+ author = {Do, Hoang Khoi},
361
+ year = {2025},
362
+ url = {https://github.com/KhoiDOO/conquer3d}
363
+ }
364
+ ```
365
+
240
366
  ---
241
367
 
242
368
  ## 📄 License
369
+
243
370
  Conquer3D is licensed under the [MIT License](LICENSE).
371
+
372
+ <div align="center">
373
+ <sub>Built with CUDA and PyTorch · <a href="https://khoidoo.github.io/conquer3d/">khoidoo.github.io/conquer3d</a></sub>
374
+ </div>
@@ -4,40 +4,125 @@
4
4
 
5
5
  ### *High-Performance GPU-Accelerated Differentiable Geometry, Spatial Computing & Neural Rendering Toolbox*
6
6
 
7
+ [![Documentation](https://img.shields.io/badge/📖_Documentation-conquer3d-76B900?style=for-the-badge)](https://khoidoo.github.io/conquer3d/)
7
8
  [![PyPI Version](https://img.shields.io/pypi/v/conquer3d.svg?color=blue&style=for-the-badge)](https://pypi.org/project/conquer3d/)
8
9
  [![Docker Image](https://img.shields.io/badge/Docker-kohido%2Fconquer3d-2496ED?logo=docker&logoColor=white&style=for-the-badge)](https://hub.docker.com/r/kohido/conquer3d)
9
10
  [![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](LICENSE)
10
- [![Python Version](https://img.shields.io/badge/Python-3.9%20%7C%203.10%20%7C%203.11-3776AB?logo=python&logoColor=white&style=for-the-badge)](https://www.python.org/)
11
+
12
+ [![Python Version](https://img.shields.io/badge/Python-3.9%2B-3776AB?logo=python&logoColor=white&style=for-the-badge)](https://www.python.org/)
11
13
  [![CUDA](https://img.shields.io/badge/CUDA-12.0%2B-76B900?logo=nvidia&logoColor=white&style=for-the-badge)](https://developer.nvidia.com/cuda-toolkit)
14
+ [![PyTorch](https://img.shields.io/badge/PyTorch-2.0%2B-EE4C2C?logo=pytorch&logoColor=white&style=for-the-badge)](https://pytorch.org/)
15
+ [![API Coverage](https://img.shields.io/badge/API_docs-1018_symbols_·_100%25-76B900?style=for-the-badge)](https://khoidoo.github.io/conquer3d/api/index.html)
12
16
 
13
17
  <p align="center">
14
- <a href="#-features--highlights">Key Features</a> •
15
- <a href="#-benchmarks">Benchmarks</a> •
16
- <a href="#-quickstart-examples">Quickstart</a> •
18
+ <b><a href="https://khoidoo.github.io/conquer3d/">🌐 Website</a></b> •
19
+ <a href="https://khoidoo.github.io/conquer3d/documentation.html">Guide</a> •
20
+ <a href="https://khoidoo.github.io/conquer3d/api/index.html">API Reference</a> •
21
+ <a href="https://khoidoo.github.io/conquer3d/benchmarks.html">Benchmarks</a> •
17
22
  <a href="#-installation">Installation</a> •
18
- <a href="#-acknowledgements--references">References</a>
23
+ <a href="#-features--highlights">Features</a>
19
24
  </p>
20
25
 
21
26
  </div>
22
27
 
23
28
  ---
24
29
 
30
+ > [!NOTE]
31
+ > The API documentation and the [documentation website](https://khoidoo.github.io/conquer3d/)
32
+ > were written with [Claude](https://claude.ai/code). The library itself — every CUDA kernel,
33
+ > data structure and operator — is the author's own work.
34
+
35
+ ---
36
+
25
37
  ## 🌟 Overview
26
38
 
27
- **Conquer3D** is an ultra-fast, GPU-native computational geometry and differentiable spatial computing library engineered in **PyTorch and CUDA**. Designed from the ground up for 3D computer vision, generative AI, neural surface reconstruction, and differentiable rendering, **Conquer3D** delivers up to **~1.0 Billion faces/second** isosurface extraction, exact CAD sharp crease preservation, and memory-efficient spatial acceleration structures.
39
+ **Conquer3D** is an ultra-fast, GPU-native computational geometry and differentiable spatial computing library engineered in **PyTorch and CUDA**. Designed from the ground up for 3D computer vision, generative AI, neural surface reconstruction, and differentiable rendering, **Conquer3D** delivers up to **~1.3 Billion faces/second** isosurface extraction, exact CAD sharp crease preservation, and memory-efficient spatial acceleration structures.
40
+
41
+ Every operator consumes and produces PyTorch tensors **in place** — no host round-trip, no format conversion — so meshing a field is an operation *inside* a training step rather than a preprocessing stage around it.
42
+
43
+ ```bash
44
+ pip install -U conquer3d
45
+ ```
46
+
47
+ ```python
48
+ import torch
49
+ from conquer3d.data_structure import create_voxel_grid
50
+ from conquer3d.ops import dmc
51
+
52
+ grid_vertices, voxels, _ = create_voxel_grid(
53
+ grid_min=[-1.0] * 3, grid_max=[1.0] * 3, res=[64, 64, 64], device="cuda"
54
+ )
55
+
56
+ sdf = (torch.norm(grid_vertices, dim=-1) - 0.6).requires_grad_(True)
57
+ verts, faces = dmc(grid_vertices, voxels, sdf, iso=0.0)
58
+
59
+ verts.sum().backward() # gradients flow back into the field
60
+ ```
61
+
62
+ ---
63
+
64
+ ## 📖 Documentation
65
+
66
+ **Full documentation lives at [khoidoo.github.io/conquer3d](https://khoidoo.github.io/conquer3d/).**
67
+
68
+ | | |
69
+ | :--- | :--- |
70
+ | **[Showcase](https://khoidoo.github.io/conquer3d/)** | What the library is for, and how to start. |
71
+ | **[Documentation](https://khoidoo.github.io/conquer3d/documentation.html)** | Installation, core concepts, architecture, and worked pipelines. |
72
+ | **[API Reference](https://khoidoo.github.io/conquer3d/api/index.html)** | Every symbol, across seven tiers. |
73
+ | **[Benchmarks](https://khoidoo.github.io/conquer3d/benchmarks.html)** | Measured extraction throughput on real geometry. |
74
+ | **[About](https://khoidoo.github.io/conquer3d/about.html)** | Motivation and the research this builds on. |
75
+
76
+ The API reference does not stop at the Python surface. It descends through the pybind11 bindings and host dispatchers into the CUDA kernels themselves, the device helpers they call, and the inline math those are built from — **1018 symbols, fully documented**:
77
+
78
+ | Tier | Layer | Symbols |
79
+ | :--- | :--- | ---: |
80
+ | **T1** | Python API | 159 |
81
+ | **T2** | Native bindings (`conquer3d._C`) | 151 |
82
+ | **T3** | Host dispatchers & C++ declarations | 437 |
83
+ | **T4** | CUDA `__global__` kernels | 109 |
84
+ | **T5** | CUDA `__device__` helpers | 69 |
85
+ | **T6** | Inline math primitives | 65 |
86
+ | **T7** | `__constant__` topology tables | 28 |
87
+
88
+ ---
89
+
90
+ ## ⚡ Benchmarks
91
+
92
+ *Measured on **NVIDIA GeForce RTX 4090** (torch 2.8.0+cu128, CUDA 12.8) on the **Fandisk CAD model** at **$1024^3$ resolution** (5.15M active cells). Timed with CUDA events around the operator alone, median of 7 runs after 2 warm-ups:*
93
+
94
+ | Algorithm | Mesh Output | Extracted Vertices | Extracted Faces / Quads | Latency (ms) | Throughput |
95
+ | :--- | :--- | ---: | ---: | ---: | ---: |
96
+ | **DMC (pure quads)** | Pure Quads | 1,716,384 | 1,716,382 | **2.51 ms** | **684M faces/s** |
97
+ | **Dual Marching Cubes** | Triangles | 1,716,384 | 3,432,764 | **2.62 ms** | **1,311M faces/s** |
98
+ | MC Asymptotic | Triangles | 1,716,382 | 3,432,760 | 2.71 ms | 1,267M faces/s |
99
+ | Dual Contouring | Triangles | 1,716,384 | 3,432,764 | 3.88 ms | 884M faces/s |
100
+ | Marching Cubes | Triangles | 1,716,382 | 3,432,760 | 7.90 ms | 434M faces/s |
101
+ | Marching Tetrahedra | Triangles | 6,113,918 | 12,227,832 | 44.90 ms | 272M faces/s |
102
+
103
+ All figures are produced by `docs/_figures/make_benchmarks.py` and can be reproduced. Sign-mode costs, pipeline setup breakdown and memory scaling are on the **[benchmarks page](https://khoidoo.github.io/conquer3d/benchmarks.html)**.
28
104
 
29
105
  ---
30
106
 
31
107
  ## ✨ Features & Highlights
32
108
 
33
- ### 🔷 1. Isosurface Extraction & Meshing
34
- - **Dual Marching Cubes (`dmc`)**: High-throughput manifold surface extraction with pure quad $(Q, 4)$ or triangle $(F, 3)$ outputs (~1.0B faces/s).
109
+ <details open>
110
+ <summary><b>🔷 1. Isosurface Extraction &amp; Meshing</b></summary>
111
+ <br>
112
+
113
+ - **Dual Marching Cubes (`dmc`)**: High-throughput manifold surface extraction with pure quad $(Q, 4)$ or triangle $(F, 3)$ outputs (~1.3B faces/s measured).
35
114
  - **Dual Contouring (`dc`)**: Sharp CAD crease and mechanical corner preservation via GPU Quadratic Error Function (QEF) solving.
36
115
  - **Marching Cubes Asymptotic (`mca`)**: Decider-enhanced Marching Cubes resolving topological face ambiguities on-the-fly.
116
+ - **Differentiable Poisson Surface Reconstruction (`dpsr`, `DPSR`)**: Differentiable spectral Fourier Poisson indicator field solving directly from oriented point clouds.
37
117
  - **Differentiable Marching Cubes (`diff_marching_cubes`)**: PyTorch autograd gradient backpropagation through levelsets into SDF and color fields.
38
118
  - **Marching Tetrahedra (`marching_tetrahedra`, `marching_tetrahedra_grid`)**: Consistent isosurface extraction across unstructured meshes and regular cubic tetrahedral grids.
39
119
 
40
- ### 🚀 2. Hardware-Accelerated Spatial Acceleration
120
+ </details>
121
+
122
+ <details>
123
+ <summary><b>🚀 2. Hardware-Accelerated Spatial Acceleration</b></summary>
124
+ <br>
125
+
41
126
  - **Triangle Mesh BVH (`MeshBVH`)**: GPU Bounding Volume Hierarchy for fast ray intersections, point projections, and signed distance queries.
42
127
  - **Gaussian Splatting BVHs (`GSBVH`, `PGSBVH`)**: Spatial hierarchies specialized for 3D Gaussian Splatting and Periodic Gaussian Splatting.
43
128
  - **Radix Linear BVH (`BVH`)**: High-throughput parallel bounding volume hierarchy for generic 3D primitives.
@@ -45,45 +130,59 @@
45
130
  - **Morton Z-Curve Sorting (`z_curve_sort`)**: 64-bit Radix-sorted space-filling curve indexing for maximizing GPU cache locality.
46
131
  - **Volumetric 3D Flood Fill**: Fast GPU bitmask ray-boundary flood fill for sign evaluation across complex geometries.
47
132
 
48
- ### 🌐 3. Volumetric Grids & Surface Conversions
133
+ </details>
134
+
135
+ <details>
136
+ <summary><b>🌐 3. Volumetric Grids &amp; Surface Conversions</b></summary>
137
+ <br>
138
+
49
139
  - **Narrow-Band Sparse Voxel Grids (`create_voxel_grid_from_tmesh`)**: Direct surface-confined voxelization bypassing dense 3D memory.
50
140
  - **Multi-Mode Normal Field Generation**: On-the-fly extraction of exact CAD face normals (`mode=0`), smooth vertex normals (`mode=1`), or SDF gradients (`mode=2`).
51
141
  - **Mesh-to-Grid Pipelines (`tmesh2voxel`, `tmesh2sparse`)**: One-line conversion from 3D meshes to dense or sparse Signed Distance Fields.
52
142
  - **Depth-Map Surface Carving (`get_active_voxel_ids_from_depth`)**: Multi-view RGB-D depth image backprojection into active voxel grids.
53
143
  - **Sparse & Occupancy Conversions (`sparse_coo2dense_occ`, `dense_occ2sparse_coo`)**: Seamless conversion between sparse coordinate tensors and dense binary occupancy volumes.
54
144
 
55
- ### 🎨 4. Radiance Fields & Differentiable Primitives
145
+ </details>
146
+
147
+ <details>
148
+ <summary><b>🎨 4. Radiance Fields &amp; Differentiable Primitives</b></summary>
149
+ <br>
150
+
56
151
  - **3D Gaussian Splatting Primitives (`compute_gs_covi`, `compute_gs_aabb`)**: GPU-accelerated covariance matrices, Mahalanobis distances, and tight AABB computation.
57
152
  - **Periodic Gaussian Splatting (`solve_pgs_cluster_tangency_radius`)**: Spatial frequency-aware radiance field query operators.
58
153
  - **Geometric Primitive Structures (`Ray`, `Triangle`, `AABB`, `Edge`)**: Vectorized GPU ray tracing and collision primitives.
59
154
 
60
- ### 📐 5. Geometric Distances & Volume Integrals
155
+ </details>
156
+
157
+ <details>
158
+ <summary><b>📐 5. Geometric Distances &amp; Volume Integrals</b></summary>
159
+ <br>
160
+
61
161
  - **Exact Chamfer Distances (`chamfer_distance`, `one_sided_chamfer_distance`)**: Point-to-point and point-to-mesh geometric error evaluation.
62
162
  - **Exact Hausdorff Distances (`hausdorff_distance`, `one_sided_hausdorff_distance`)**: Maximum deviation metrics for surface fidelity assessment.
63
163
  - **Single-View Volume Integrals (`single_view_volume_integral`)**: Analytical divergence-theorem ray volume integration.
64
164
 
65
- ### 📦 6. 3D Data Loading, Augmentation & Collation
165
+ </details>
166
+
167
+ <details>
168
+ <summary><b>📦 6. 3D Data Loading, Augmentation &amp; Collation</b></summary>
169
+ <br>
170
+
66
171
  - **Benchmark 3D Datasets (`Digit3D`, `PointDigit3D`, `RedWood`, `MeshDataset`)**: Ready-to-use PyTorch dataset abstractions.
67
172
  - **Standard Benchmark 3D Assets (`conquer3d.data.assets`)**: One-click download & caching for Stanford Bunny, Armadillo, Dragon, Lucy, Happy Buddha, Spot, Cow, Teapot, Suzanne, Fandisk, Iphigenia, and more.
68
173
  - **Geometric Data Augmentations (`Rotation`, `Scale`, `RandomRotation`, `RandomScale`, `Sequence`, `MeshSequence`)**: Composable spatial transformation pipelines.
69
174
  - **Custom PyTorch Batch Collation (`bmesh_collate_fn`, `sparse_collate_fn`)**: Efficient handling of variable-sized meshes and sparse tensors in DataLoaders.
70
175
 
71
- ### 🛠️ 7. Procedural Generation & File I/O
72
- - **Procedural Mesh Generators (`create_sphere`, `create_tetrahedra`)**: Parametric geometric shape creation utilities.
73
- - **High-Performance Mesh I/O (`read_obj`, `write_obj`, `read_off`)**: Native loading and saving for vertices, faces, and vertex colors.
74
-
75
- ---
176
+ </details>
76
177
 
77
- ## ⚡ Benchmarks
178
+ <details>
179
+ <summary><b>🛠️ 7. Procedural Generation &amp; File I/O</b></summary>
180
+ <br>
78
181
 
79
- *Empirical extraction performance on **NVIDIA GeForce RTX 4090** on the **Fandisk CAD model** at **$1024^3$ resolution** (6.86M sparse vertices, 5.15M active voxels):*
182
+ - **Procedural Mesh Generators (`create_sphere`, `create_tetrahedra`)**: Parametric geometric shape creation utilities.
183
+ - **High-Performance Mesh I/O (`read_obj`, `write_obj`, `read_off`)**: Native loading and saving for vertices, faces, and vertex colors.
80
184
 
81
- | Algorithm | Mesh Output | Extracted Vertices | Extracted Faces / Quads | Latency (ms) | Throughput | Watertight |
82
- | :--- | :--- | :--- | :--- | :---: | :---: | :---: |
83
- | **Dual Marching Cubes (DMC)** | Triangles | **1,716,386** | **3,432,768** | **3.44 ms** | **~1.0B faces/s** | **Yes** |
84
- | **Dual Marching Cubes (DMC)** | Pure Quads | **1,716,386** | **1,716,384** | **3.22 ms** | **533M quads/s** | **Yes** |
85
- | **Dual Contouring (DC + Normals)** | Triangles | 1,716,386 | 3,432,768 | **4.79 ms** | **717M faces/s** | **Yes** |
86
- | **Marching Cubes Asymptotic (MCA)** | Triangles | 1,716,384 | 3,432,764 | 16.42 ms | **209M faces/s** | **Yes** |
185
+ </details>
87
186
 
88
187
  ---
89
188
 
@@ -156,6 +255,10 @@ query_ids, closest_tri_ids, projected_pts, sdfs = tmesh.query_points(
156
255
  )
157
256
  ```
158
257
 
258
+ > [!TIP]
259
+ > More worked pipelines, the core concepts behind them, and the full operator reference are on the
260
+ > **[documentation site](https://khoidoo.github.io/conquer3d/documentation.html)**.
261
+
159
262
  ---
160
263
 
161
264
  ## 📦 Installation
@@ -165,6 +268,8 @@ query_ids, closest_tri_ids, projected_pts, sdfs = tmesh.query_points(
165
268
  pip install -U conquer3d
166
269
  ```
167
270
 
271
+ Prebuilt CUDA wheels are attached to each release for **Python 3.10–3.14** against **PyTorch 2.8 and 2.11** (CUDA 12.8).
272
+
168
273
  ### 2. Docker (Recommended for instant GPU / CUDA environment)
169
274
  ```bash
170
275
  # Pull and run the pre-built image
@@ -195,16 +300,42 @@ cd conquer3d
195
300
  pip install -e . --no-build-isolation
196
301
  ```
197
302
 
303
+ > [!NOTE]
304
+ > Importing `conquer3d` loads the compiled `_C` extension at module scope, so a CUDA-capable device
305
+ > and a matching PyTorch build are required.
306
+
198
307
  ---
199
308
 
200
309
  ## 📚 Acknowledgements & References
310
+
201
311
  For further theoretical background, GPU collision detection guides, and related literature, please visit:
312
+
202
313
  - **[Research Papers](acknowledgement/REFERENCE.md)**: Computational geometry, differential topology, and acceleration structure foundations.
203
314
  - **[Blog Posts](acknowledgement/BLOG_POST.md)**: GPU spatial traversal, parallel BVH construction, and CUDA optimization guides.
204
315
  - **[Related Repositories](acknowledgement/REPOSITORY.md)**: Open-source geometric deep learning ecosystem.
205
316
  - **[Books](acknowledgement/BOOK.md)**: Core computational geometry references.
206
317
 
318
+ A rendered bibliography is also available on the **[About page](https://khoidoo.github.io/conquer3d/about.html)**.
319
+
320
+ ---
321
+
322
+ ## 📝 Citation
323
+
324
+ ```bibtex
325
+ @software{conquer3d,
326
+ title = {Conquer3D: GPU-Accelerated Differentiable Geometry and Spatial Computing},
327
+ author = {Do, Hoang Khoi},
328
+ year = {2025},
329
+ url = {https://github.com/KhoiDOO/conquer3d}
330
+ }
331
+ ```
332
+
207
333
  ---
208
334
 
209
335
  ## 📄 License
210
- Conquer3D is licensed under the [MIT License](LICENSE).
336
+
337
+ Conquer3D is licensed under the [MIT License](LICENSE).
338
+
339
+ <div align="center">
340
+ <sub>Built with CUDA and PyTorch · <a href="https://khoidoo.github.io/conquer3d/">khoidoo.github.io/conquer3d</a></sub>
341
+ </div>
@@ -97,15 +97,17 @@ def tmesh2sparse(
97
97
  pad: int = 0,
98
98
  return_normals: bool = False,
99
99
  normal_mode: int = 0,
100
- drop_empty_vertex_voxels: bool = False
100
+ drop_empty_vertex_voxels: bool = False,
101
+ return_sdf: bool = True
101
102
  ) -> Union[
103
+ Tuple[torch.Tensor, torch.Tensor],
102
104
  Tuple[torch.Tensor, torch.Tensor, torch.Tensor],
103
105
  Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]
104
106
  ]:
105
107
  """Computes Signed Distance Fields on sparse voxel grids strictly near the surface.
106
108
 
107
109
  Completely bypasses dense $O(R^3)$ volume allocation by querying the mesh BVH,
108
- re-indexing sparse active vertices, and evaluating SDF solely on active points.
110
+ re-indexing sparse active vertices, and optionally evaluating SDF solely on active points.
109
111
 
110
112
  Args:
111
113
  tm (TriangleMesh): Input TriangleMesh GPU object.
@@ -126,11 +128,19 @@ def tmesh2sparse(
126
128
  return_normals (bool, optional): If True, returns surface normal vectors. Defaults to False.
127
129
  normal_mode (int, optional): Normal mode (0: face normals, 1: vertex normals, 2: displacement vector).
128
130
  drop_empty_vertex_voxels (bool, optional): If True, drops voxels containing no mesh vertices inside their bounding box. Defaults to False.
131
+ return_sdf (bool, optional): If True, queries and returns the Signed Distance Field on sparse grid vertices.
132
+ If False, skips SDF evaluation entirely. Defaults to True.
129
133
 
130
134
  Returns:
131
- Union[Tuple[torch.Tensor, torch.Tensor, torch.Tensor], Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]]:
132
- - If `return_normals=False`: `(sparse_grid_vertices, active_voxels, sdfs)`
133
- - If `return_normals=True`: `(sparse_grid_vertices, active_voxels, sdfs, grid_normals)`
135
+ Union[
136
+ Tuple[torch.Tensor, torch.Tensor],
137
+ Tuple[torch.Tensor, torch.Tensor, torch.Tensor],
138
+ Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]
139
+ ]:
140
+ - If `return_sdf=True` and `return_normals=False`: `(sparse_grid_vertices, active_voxels, sdfs)`
141
+ - If `return_sdf=True` and `return_normals=True`: `(sparse_grid_vertices, active_voxels, sdfs, grid_normals)`
142
+ - If `return_sdf=False` and `return_normals=False`: `(sparse_grid_vertices, active_voxels)`
143
+ - If `return_sdf=False` and `return_normals=True`: `(sparse_grid_vertices, active_voxels, grid_normals)`
134
144
  """
135
145
  if grid_min is None:
136
146
  grid_min = [-1.0, -1.0, -1.0]
@@ -155,6 +165,11 @@ def tmesh2sparse(
155
165
  )
156
166
 
157
167
  num_points = grid_vertices.shape[0]
168
+ if not return_sdf:
169
+ if return_normals:
170
+ return grid_vertices, active_voxels.to(torch.int64), grid_normals
171
+ return grid_vertices, active_voxels.to(torch.int64)
172
+
158
173
  if num_points == 0:
159
174
  sdfs = torch.empty(0, dtype=torch.float32, device=device)
160
175
  if return_normals: