hydrocouple.meshkit 0.2.0__tar.gz → 0.3.0__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 (187) hide show
  1. hydrocouple_meshkit-0.3.0/CHANGELOG.md +125 -0
  2. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/CMakeLists.txt +13 -1
  3. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/NATIVE_API.md +14 -5
  4. {hydrocouple_meshkit-0.2.0/python/hydrocouple.meshkit.egg-info → hydrocouple_meshkit-0.3.0}/PKG-INFO +5 -2
  5. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/README.md +17 -3
  6. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/cmake/CoreTargets.cmake +1 -1
  7. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/core/editgeometry.h +2 -2
  8. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/breaklinestrips.h +8 -1
  9. hydrocouple_meshkit-0.3.0/include/mesh/cellplanner.h +250 -0
  10. hydrocouple_meshkit-0.3.0/include/mesh/constraintaudit.h +151 -0
  11. hydrocouple_meshkit-0.3.0/include/mesh/constraintpreview.h +103 -0
  12. hydrocouple_meshkit-0.3.0/include/mesh/constraintsimplifier.h +254 -0
  13. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/inpmeshreader.h +7 -0
  14. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/inpmeshwriter.h +11 -3
  15. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshbctype.h +16 -4
  16. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshcdt.h +2 -0
  17. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshcellgeom.h +4 -4
  18. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshcellparams.h +12 -9
  19. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshcellstats.h +28 -18
  20. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshedgebc.h +13 -6
  21. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshgenerator.h +120 -7
  22. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshinfil.h +30 -23
  23. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshpatch.h +43 -18
  24. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshquadcleanup.h +14 -7
  25. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshquadmatch.h +10 -4
  26. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshquadquality.h +8 -4
  27. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshquadregion.h +27 -5
  28. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshreorder.h +2 -2
  29. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshresolution.h +78 -13
  30. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshresult.h +51 -11
  31. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/naturalnbinterpolator.h +32 -16
  32. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/pslgprep.h +9 -3
  33. hydrocouple_meshkit-0.3.0/include/mesh/qtcdtstorage.h +45 -0
  34. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/qtnative.h +279 -0
  35. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/quadblocks.h +9 -2
  36. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/sizefield.h +27 -6
  37. hydrocouple_meshkit-0.3.0/include/mesh/sizingaudit.h +137 -0
  38. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/sms2dmreader.h +7 -0
  39. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/meshkit/blocks.hpp +29 -3
  40. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/meshkit/cdt.hpp +205 -27
  41. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/meshkit/coarseningqueue.hpp +30 -1
  42. hydrocouple_meshkit-0.3.0/include/meshkit/constraintaudit.hpp +148 -0
  43. hydrocouple_meshkit-0.3.0/include/meshkit/constraints.hpp +279 -0
  44. hydrocouple_meshkit-0.3.0/include/meshkit/detail/planmodel.hpp +337 -0
  45. hydrocouple_meshkit-0.3.0/include/meshkit/detail/storage.hpp +517 -0
  46. hydrocouple_meshkit-0.3.0/include/meshkit/events.hpp +282 -0
  47. hydrocouple_meshkit-0.3.0/include/meshkit/geometry.hpp +324 -0
  48. hydrocouple_meshkit-0.3.0/include/meshkit/io.hpp +133 -0
  49. hydrocouple_meshkit-0.3.0/include/meshkit/job.hpp +570 -0
  50. hydrocouple_meshkit-0.3.0/include/meshkit/mesh.hpp +291 -0
  51. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/meshkit/patch.hpp +58 -20
  52. hydrocouple_meshkit-0.3.0/include/meshkit/planning.hpp +295 -0
  53. hydrocouple_meshkit-0.3.0/include/meshkit/progress.hpp +43 -0
  54. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/meshkit/quadquality.hpp +12 -7
  55. hydrocouple_meshkit-0.3.0/include/meshkit/raster.hpp +111 -0
  56. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/meshkit/regions.hpp +18 -4
  57. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/meshkit/sizefield.hpp +35 -13
  58. hydrocouple_meshkit-0.3.0/include/meshkit/terrainblocks.hpp +55 -0
  59. hydrocouple_meshkit-0.3.0/include/meshkit/terrainlines.hpp +107 -0
  60. hydrocouple_meshkit-0.3.0/include/meshkit/terrainpolicy.hpp +109 -0
  61. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/python/README.md +3 -1
  62. hydrocouple_meshkit-0.3.0/python/docs/_hydrocouple/hydrocouple_theme.py +135 -0
  63. hydrocouple_meshkit-0.3.0/python/docs/_intersphinx/README.md +32 -0
  64. hydrocouple_meshkit-0.3.0/python/docs/conf.py +187 -0
  65. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0/python/hydrocouple.meshkit.egg-info}/PKG-INFO +5 -2
  66. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/python/hydrocouple.meshkit.egg-info/SOURCES.txt +11 -0
  67. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/python/meshkit/__init__.py +53 -2
  68. hydrocouple_meshkit-0.3.0/python/meshkit/_meshkit.pyi +285 -0
  69. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/setup.py +2 -1
  70. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/breaklinestrips.cpp +1 -1
  71. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/inpmeshreader.cpp +6 -6
  72. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/inpmeshwriter.cpp +3 -3
  73. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/meshcellparams.cpp +1 -1
  74. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/meshgenerator.cpp +10 -10
  75. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/meshinfil.cpp +7 -4
  76. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/meshquadcleanup.cpp +2 -2
  77. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/meshreorder.cpp +1 -1
  78. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/naturalnbinterpolator.cpp +16 -16
  79. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/pslgprep.cpp +1 -1
  80. hydrocouple_meshkit-0.3.0/src/mesh/quadblocks.cpp +27 -0
  81. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/sizingaudit.cpp +1 -1
  82. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/blocks.cpp +4 -4
  83. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/cdt_impl.hpp +18 -5
  84. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/constraintaudit.cpp +2 -2
  85. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/constraintshared.cpp +1 -1
  86. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/file.hpp +181 -0
  87. hydrocouple_meshkit-0.3.0/src/native/job.cpp +3243 -0
  88. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/mesh.cpp +1 -1
  89. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/mixed.hpp +156 -19
  90. hydrocouple_meshkit-0.3.0/src/native/operation.hpp +212 -0
  91. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/patch.cpp +15 -12
  92. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/planning.cpp +4 -4
  93. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/python.cpp +7 -4
  94. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/regionlimits.hpp +20 -0
  95. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/regions.cpp +3 -3
  96. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/sizefield.cpp +2 -2
  97. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/sourcechains.hpp +26 -0
  98. hydrocouple_meshkit-0.3.0/src/native/terrainblocks.cpp +154 -0
  99. hydrocouple_meshkit-0.3.0/src/native/terrainlines.cpp +464 -0
  100. hydrocouple_meshkit-0.3.0/tests/native_mixed_test.cpp +774 -0
  101. hydrocouple_meshkit-0.3.0/tests/terrainblocks_test.cpp +89 -0
  102. hydrocouple_meshkit-0.3.0/tests/terrainjob_test.cpp +610 -0
  103. hydrocouple_meshkit-0.3.0/tests/terrainlines_test.cpp +191 -0
  104. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/test_meshcdt.cpp +1 -1
  105. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/test_meshgenerator_v2.cpp +7 -7
  106. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tools/meshkit.cpp +1 -1
  107. hydrocouple_meshkit-0.2.0/CHANGELOG.md +0 -52
  108. hydrocouple_meshkit-0.2.0/include/mesh/cellplanner.h +0 -80
  109. hydrocouple_meshkit-0.2.0/include/mesh/constraintaudit.h +0 -41
  110. hydrocouple_meshkit-0.2.0/include/mesh/constraintpreview.h +0 -29
  111. hydrocouple_meshkit-0.2.0/include/mesh/constraintsimplifier.h +0 -86
  112. hydrocouple_meshkit-0.2.0/include/mesh/qtcdtstorage.h +0 -19
  113. hydrocouple_meshkit-0.2.0/include/mesh/sizingaudit.h +0 -54
  114. hydrocouple_meshkit-0.2.0/include/meshkit/constraintaudit.hpp +0 -42
  115. hydrocouple_meshkit-0.2.0/include/meshkit/constraints.hpp +0 -84
  116. hydrocouple_meshkit-0.2.0/include/meshkit/detail/planmodel.hpp +0 -170
  117. hydrocouple_meshkit-0.2.0/include/meshkit/detail/storage.hpp +0 -208
  118. hydrocouple_meshkit-0.2.0/include/meshkit/events.hpp +0 -167
  119. hydrocouple_meshkit-0.2.0/include/meshkit/geometry.hpp +0 -116
  120. hydrocouple_meshkit-0.2.0/include/meshkit/io.hpp +0 -39
  121. hydrocouple_meshkit-0.2.0/include/meshkit/job.hpp +0 -95
  122. hydrocouple_meshkit-0.2.0/include/meshkit/mesh.hpp +0 -81
  123. hydrocouple_meshkit-0.2.0/include/meshkit/planning.hpp +0 -81
  124. hydrocouple_meshkit-0.2.0/include/meshkit/progress.hpp +0 -16
  125. hydrocouple_meshkit-0.2.0/include/meshkit/raster.hpp +0 -34
  126. hydrocouple_meshkit-0.2.0/include/meshkit/terrainpolicy.hpp +0 -59
  127. hydrocouple_meshkit-0.2.0/src/mesh/quadblocks.cpp +0 -9
  128. hydrocouple_meshkit-0.2.0/src/native/job.cpp +0 -1211
  129. hydrocouple_meshkit-0.2.0/src/native/operation.hpp +0 -125
  130. hydrocouple_meshkit-0.2.0/tests/native_mixed_test.cpp +0 -180
  131. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/LICENSE +0 -0
  132. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/MANIFEST.in +0 -0
  133. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/NOTICE +0 -0
  134. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/PROVENANCE.md +0 -0
  135. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/RELICENSING.md +0 -0
  136. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/VALIDATION.md +0 -0
  137. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/cmake/MeshKitConfig.cmake.in +0 -0
  138. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/cmake/PythonTargets.cmake +0 -0
  139. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/cmake/QtTargets.cmake +0 -0
  140. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/coarseningqueue.h +0 -0
  141. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshedgekey.h +0 -0
  142. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/meshprogress.h +0 -0
  143. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/include/mesh/terrainpolicy.h +0 -0
  144. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/pyproject.toml +0 -0
  145. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/python/hydrocouple.meshkit.egg-info/dependency_links.txt +0 -0
  146. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/python/hydrocouple.meshkit.egg-info/not-zip-safe +0 -0
  147. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/python/hydrocouple.meshkit.egg-info/requires.txt +0 -0
  148. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/python/hydrocouple.meshkit.egg-info/top_level.txt +0 -0
  149. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/setup.cfg +0 -0
  150. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/core/editgeometry.cpp +0 -0
  151. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/cellplanner.cpp +0 -0
  152. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/constraintaudit.cpp +0 -0
  153. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/constraintpreview.cpp +0 -0
  154. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/constraintshared.cpp +0 -0
  155. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/constraintsimplifier.cpp +0 -0
  156. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/meshbctype.cpp +0 -0
  157. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/meshcdt.cpp +0 -0
  158. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/meshcellstats.cpp +0 -0
  159. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/meshpatch.cpp +0 -0
  160. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/meshquadmatch.cpp +0 -0
  161. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/meshquadregion.cpp +0 -0
  162. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/sizefield.cpp +0 -0
  163. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/mesh/sms2dmreader.cpp +0 -0
  164. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/binaryio.cpp +0 -0
  165. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/cdt.cpp +0 -0
  166. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/constraints.cpp +0 -0
  167. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/raster.cpp +0 -0
  168. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/src/native/smsio.cpp +0 -0
  169. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/cellplanner_test.cpp +0 -0
  170. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/constraints_test.cpp +0 -0
  171. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/inp_read_probe.cpp +0 -0
  172. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/kernel_parity_test.cpp +0 -0
  173. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/make_inp_mesh_fixture.py +0 -0
  174. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/mesher_io_test.cpp +0 -0
  175. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/mixed_scale_probe.py +0 -0
  176. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/native_core_test.cpp +0 -0
  177. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/native_io_test.cpp +0 -0
  178. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/native_scale_probe.cpp +0 -0
  179. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/python_test.py +0 -0
  180. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/raster_test.cpp +0 -0
  181. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/runtime_test.cpp +0 -0
  182. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/scale_probe.cpp +0 -0
  183. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/sizing_test.cpp +0 -0
  184. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/tests/thinning_test.cpp +0 -0
  185. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/vendor/predicates/LICENSE +0 -0
  186. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/vendor/predicates/predicates.c +0 -0
  187. {hydrocouple_meshkit-0.2.0 → hydrocouple_meshkit-0.3.0}/vendor/predicates/predicates.h +0 -0
@@ -0,0 +1,125 @@
1
+ # Changelog
2
+
3
+ ## 0.3.0 — 2026-12-01
4
+
5
+ The desktop generator's remaining meshing behavior moves into the native core
6
+ (`meshkit::core`, `meshkit::runtime`), and a browser can run mesh jobs
7
+ through WebAssembly bindings.
8
+
9
+ Added:
10
+
11
+ - Terrain break lines: `extractTerrainLines` ports the desktop's break-line
12
+ detector and ranking (smoothed Hessian curvature, non-maximum suppression,
13
+ hysteresis, tracing, minimum length). `JobRequest::terrainLines` meshes
14
+ them as non-barrier edges, prepared after the patches as the desktop's
15
+ Legacy routing does; `JobOptions::quadsBetweenBreaklines` lays bank-pair
16
+ strips of quads between facing lines (streets, ditches).
17
+ - Conduit strips: `JobRequest::stripWidths` places the desktop generator's
18
+ strips of quads along open lines, with its cuts at turns, end set-backs,
19
+ sizing and fit checks. `JobReport::stripsPlaced` and `stripsDropped`
20
+ count every strip; strip decisions follow the quad region decisions in
21
+ the planning list.
22
+ - Terrain sizing: `TerrainBlockSizes` ports the desktop's Legacy terrain
23
+ block sizing (largest dyadic block within a vertical tolerance of the
24
+ bilinear surface); `JobRequest::sizeFieldFeatures` grades the size field;
25
+ `JobOptions::terrainPolicy` carries the constant or scaled tolerance rule.
26
+ - `JobOptions::latticeSpacing` seeds one hexagonal lattice per size band
27
+ before refinement, as the desktop generator, so open ground stays
28
+ near-equilateral; `JobReport::latticeSeeds` counts the points.
29
+ - `JobOptions::patchRouting` offers the desktop's Legacy patch routing
30
+ beside Unified planning: each quad region mapped on its own before the
31
+ strips, automatic open blocks from the desktop's pilot pass.
32
+ - WebAssembly bindings (`wasm/`, `@hydrocouple/meshkit-wasm`): `runJob` runs
33
+ a mesh job in the browser and returns the owned buffers and the report.
34
+ The bindings marshal the graded size field, quad regions, corridor
35
+ patches and open blocks, the terrain tolerance rule, and
36
+ `simplifyConstraints` with the independent audit the desktop runs.
37
+
38
+ Fixed:
39
+
40
+ - A planned quad region is outlined by its patch boundary rather than its
41
+ ring, so a skewed or bent region no longer fails with "constraint crosses
42
+ another constraint".
43
+
44
+ Breaking (Qt targets, transitional per CONTRIBUTING Section 8):
45
+
46
+ - `mesh::InfilLookupTable::applyFallback` says whether keys no entry lists
47
+ receive the `fallback` row; an explicit None fallback switches infiltration
48
+ off for those cells. `saveLookupTableCsv` writes the `*` row only when it
49
+ is set and `loadLookupTableCsv` sets it when a `*` row is read, so a table
50
+ built in code must set it to keep its fallback. Before, a non-None fallback
51
+ was written unconditionally and a None one was dropped.
52
+
53
+ Documentation:
54
+
55
+ - A documentation site, built by a new Documentation workflow and published
56
+ to GitHub Pages from `main`: Doxygen reference for the C++ library, with the
57
+ project's Markdown pages, and Sphinx documentation for the Python package
58
+ (install, quickstart, guides to requests, results, source preparation and
59
+ files, and the API reference). Both builds fail on warnings.
60
+ - `python/meshkit/_meshkit.pyi`: a type stub documenting the native
61
+ extension's functions, `MeshResult` and `Job`.
62
+ - Doxygen comments for every class, function, member, enum value and namespace
63
+ of the C++ library (about 1,300 were undocumented), written from the
64
+ implementation; the Documentation workflow now fails on undocumented code.
65
+ - Corrected existing comments that disagreed with the code, among them: ten
66
+ `@file` names that pointed at the old Qt header names; `Limits::maxWork`
67
+ (20 billion applies only to the job's own counter); `SizeField::build`
68
+ (a failed build can leave `isValid()` true); `QualityReport::capped` and
69
+ `blockedByFixed`; `MeshEdgeBC::operator==` (also compares `wallDrag`);
70
+ `QuadRegionMode::Submapped` and `Free` (classifications that the generator
71
+ meshes like `Mapped`); and `NATIVE_API.md` on the work limit.
72
+ - The manuals adopt the HydroCouple website theme (dark mode, menu of the
73
+ live manuals) and are built with Doxygen 1.17.0, pinned and checksummed in
74
+ the Documentation workflow.
75
+ - American spelling in comments, docstrings, documentation and messages;
76
+ identifiers, saved values, file names and keywords keep their spelling.
77
+
78
+ ## 0.2.0 — first standalone release
79
+
80
+ MeshKit moves out of the OpenSWMM GUI repository (`libraries/meshkit`) into its
81
+ own repository, with its history. Apart from the addition and fixes below, the
82
+ library is unchanged from the GUI's 2026-11-12 copy; what is new is the
83
+ repository around it.
84
+
85
+ Added:
86
+
87
+ - Initial cell velocity: `MeshTriangle::initU` and `initV` (m/s whatever the
88
+ project units; 0, 0 = at rest), read from and written to the
89
+ `[2D_INITIAL_VELOCITY]` section, offered as the `initU`/`initV` cell
90
+ parameters and kept through quad pairing. An external mesh file's section
91
+ wins over the `.inp`'s. Ported from the GUI's copy (2026-11-13).
92
+
93
+ Fixed:
94
+
95
+ - The robust predicates are compiled without floating-point contraction
96
+ (`-ffp-contract=off`). GCC fuses multiply-adds by default wherever the CPU has
97
+ FMA, which every arm64 CPU does; a fused multiply-add skips a rounding the
98
+ exact `orient2d`/`incircle` arithmetic depends on. On Linux arm64 that made
99
+ constraint insertion and point location fail (`meshkit_meshcdt_test`,
100
+ `meshkit_meshgenerator_v2_test`); Apple Clang can fuse within an expression.
101
+ - macOS wheels for x86_64, which cibuildwheel cross-builds on arm64 runners,
102
+ now contain x86_64 code: `setup.py` passes the architecture named in
103
+ `ARCHFLAGS` to CMake, and always sets one, so a reused build tree cannot keep
104
+ another.
105
+
106
+ Repository:
107
+
108
+
109
+ - Builds, tests and installs on its own (`cmake -S .`); consumers use
110
+ `find_package(MeshKit)` or fetch a tagged release with `FetchContent`.
111
+ - Continuous integration: the Qt-free targets on Linux, macOS and Windows, and
112
+ the Qt targets on Linux. macOS jobs run on `macos-latest` (GitHub retired the
113
+ `macos-14` runners).
114
+ - Release wheels: on a `v*` tag, cibuildwheel builds the Python package for
115
+ CPython 3.10–3.13 on Linux, macOS and Windows and publishes it, with an sdist,
116
+ to PyPI as `hydrocouple.meshkit` (`pip install hydrocouple.meshkit`, then
117
+ `import meshkit`; PyPI refuses the name `meshkit` as too close to the
118
+ unrelated `mesh-kit`). The release refuses a tag that does not match the
119
+ version in `CMakeLists.txt` and `setup.py`.
120
+ - Apache-2.0 (rights-holder authorization recorded in RELICENSING.md); the
121
+ vendored robust predicates keep their public-domain notice.
122
+ - Project governance shared with the other HydroCouple repositories:
123
+ contribution guide, individual and corporate CLAs, Code of Conduct, security
124
+ policy, privacy statement, authors, citation metadata (CITATION.cff,
125
+ .zenodo.json), issue templates, and CodeQL and OpenSSF Scorecard workflows.
@@ -1,5 +1,5 @@
1
1
  cmake_minimum_required(VERSION 3.21)
2
- project(MeshKit VERSION 0.2.0 LANGUAGES C CXX)
2
+ project(MeshKit VERSION 0.3.0 LANGUAGES C CXX)
3
3
 
4
4
  # The standard C++ event API is independent of the optional transitional Qt targets.
5
5
  include(GNUInstallDirs)
@@ -79,6 +79,18 @@ if(MESHKIT_BUILD_TESTS)
79
79
  set_target_properties(meshkit_native_mixed_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
80
80
  target_link_libraries(meshkit_native_mixed_test PRIVATE meshkit::core)
81
81
  add_test(NAME meshkit_native_mixed_test COMMAND meshkit_native_mixed_test)
82
+ add_executable(meshkit_terrainblocks_test tests/terrainblocks_test.cpp)
83
+ set_target_properties(meshkit_terrainblocks_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
84
+ target_link_libraries(meshkit_terrainblocks_test PRIVATE meshkit::core)
85
+ add_test(NAME meshkit_terrainblocks_test COMMAND meshkit_terrainblocks_test)
86
+ add_executable(meshkit_terrainlines_test tests/terrainlines_test.cpp)
87
+ set_target_properties(meshkit_terrainlines_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
88
+ target_link_libraries(meshkit_terrainlines_test PRIVATE meshkit::core)
89
+ add_test(NAME meshkit_terrainlines_test COMMAND meshkit_terrainlines_test)
90
+ add_executable(meshkit_terrainjob_test tests/terrainjob_test.cpp)
91
+ set_target_properties(meshkit_terrainjob_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
92
+ target_link_libraries(meshkit_terrainjob_test PRIVATE meshkit::core)
93
+ add_test(NAME meshkit_terrainjob_test COMMAND meshkit_terrainjob_test)
82
94
  add_executable(meshkit_raster_test tests/raster_test.cpp)
83
95
  set_target_properties(meshkit_raster_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
84
96
  target_link_libraries(meshkit_raster_test PRIVATE meshkit::core)
@@ -30,7 +30,15 @@ frame. `Path` connectivity indexes these points, starting at zero. An explicit
30
30
  outer domain is required. Outer domains form a union; holes are subtracted.
31
31
  Region and line paths constrain edges. Non-line paths close implicitly; line
32
32
  closure is explicit. Region seeds must be strictly inside a retained constrained
33
- component. Conflicting seeds fail. Source points outside the retained domain or
33
+ component. `JobRequest::terrainLines` takes dense terrain break lines (for
34
+ example from `extractTerrainLines` and `rankTerrainLines`); as the desktop
35
+ generator, the job cuts them back from everything else, simplifies them and keeps
36
+ the pieces that are long and clear enough as `Terrain` paths: constrained and
37
+ delivered like lines, but they do not bound region components. With
38
+ `JobOptions::quadsBetweenBreaklines` (off by default, mixed cells only), kept
39
+ pieces that face each other with lower ground between them (sampled from
40
+ `Providers::elevation`) first become bank-pair quad strips, as the desktop's
41
+ streets and ditches, and the lines are prepared again around them. Conflicting seeds fail. Source points outside the retained domain or
34
42
  inside a hole fail rather than disappearing silently. Dense raw terrain samples
35
43
  should be supplied through terrain providers, not declared as mandatory pins.
36
44
 
@@ -42,14 +50,14 @@ Crossing lines must be noded before using the native job API; the transitional G
42
50
  pipeline has its existing intersection preparation. Near coordinates remain
43
51
  distinct; minimum target size never becomes a welding radius in this API.
44
52
 
45
- `Metadata` declares metres per XY unit and metres per Z unit. Size/edge policies
53
+ `Metadata` declares meters per XY unit and meters per Z unit. Size/edge policies
46
54
  and provider footprint bounds use XY units; elevation and error tolerance use Z
47
55
  units. The facet-normal scale derives from the physical unit scales. No CRS
48
56
  conversion occurs here. Unknown units fail a job; imported SMS 2DM units start
49
57
  unknown. Metadata strings are UTF-8. Provider identity is caller-supplied evidence
50
58
  of the dataset/version; it is not a library-generated content fingerprint.
51
59
 
52
- `CellPlan::AutomaticMixed` enables jointly planned mapped patches, optionally automatic open-area blocks, and triangle infill. `quadRegions` carry required/preferred/triangles-only policies and optional directional spacing. `fixedPatches` accept validated local quad geometry and incident line chains. Source/hole/line geometry protects patch placement. Shared sides reuse canonical stations. Incompatible required shapes fail; preferred patches fall back with bounded decision records. Up to three mixed-interface retries repair required spacing or decline a preferred patch. Final face incidence must be conforming; no hanging patch interface is accepted.
60
+ `CellPlan::AutomaticMixed` enables jointly planned mapped patches, optionally automatic open-area blocks, and triangle infill. `quadRegions` carry required/preferred/triangles-only policies and optional directional spacing. `fixedPatches` accept validated local quad geometry and incident line chains. Source/hole/line geometry protects patch placement. Shared sides reuse canonical stations. Incompatible required shapes fail; preferred patches fall back with bounded decision records. Up to three mixed-interface retries repair required spacing or decline a preferred patch. Final face incidence must be conforming; no hanging patch interface is accepted. `JobOptions::patchRouting` selects the desktop generator's routing: `Unified` (the default) plans regions, fixed patches and automatic blocks jointly after the conduit strips, kept off the terrain lines the job would keep; `Legacy` maps each four-sided region on its own before the strips (a region the lines cross keeps its quads and the lines are cut back from it) and places automatic blocks on a first, blockless mesh, as the desktop dialog's pilot pass.
53
61
 
54
62
  `meshkit::plan` exposes the same patch, planning, size-field, source simplification and independent audit algorithms used by Qt facades. Its containers are standard C++ storage; no Qt headers/runtime are needed. The generic result uses owned vectors. Final audits borrow read-only arrays through accessors rather than copying millions of vertices. Legacy Qt free-quad matching and application-specific mesh attributes remain optional adapters.
55
63
 
@@ -85,7 +93,8 @@ options and provider identity. Events use the existing bounded `EventChannel`.
85
93
  Limits bound counts, estimated workspace and orchestration/audit work, not total
86
94
  process RSS or arbitrary time inside caller providers. The kernel also has
87
95
  insertion/cell/repair caps and polls cancellation within build/refinement loops.
88
- Zero work allowance selects 20 billion orchestration/audit units. A job returns no
96
+ Zero work allowance selects 20 billion units for the job's own counter; patch planning
97
+ and the final constraint audit then size their budgets from their inputs. A job returns no
89
98
  partially accepted candidate when it reaches a cap. `validateMesh` checks finite
90
99
  coordinates, IDs, local connectivity and positive convex cell geometry; it does
91
100
  not certify arbitrary nonincident cell overlap or CRS correctness.
@@ -170,7 +179,7 @@ meshkit inspect rectangle.mkb
170
179
  meshkit convert rectangle.mkb rectangle.2dm --allow-loss
171
180
  ```
172
181
 
173
- `box` explicitly declares a flat rectangular domain, zero elevation and metre
182
+ `box` explicitly declares a flat rectangular domain, zero elevation and meter
174
183
  units. `--overwrite` permits replacement. SIGINT/SIGTERM request cancellation.
175
184
  No mesh bounds, units, terrain source or missing domain are silently inferred by
176
185
  an import-to-job shortcut.
@@ -1,10 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hydrocouple.meshkit
3
- Version: 0.2.0
3
+ Version: 0.3.0
4
4
  Summary: Independent mixed meshing with terrain certificates and streaming I/O
5
5
  Home-page: https://github.com/HydroCouple/Meshkit
6
6
  License: Apache-2.0
7
7
  Project-URL: Source, https://github.com/HydroCouple/Meshkit
8
+ Project-URL: Documentation, https://www.hydrocouple.org/Meshkit/python/
8
9
  Project-URL: Changelog, https://github.com/HydroCouple/Meshkit/blob/main/CHANGELOG.md
9
10
  Requires-Python: >=3.10
10
11
  Description-Content-Type: text/markdown
@@ -26,6 +27,8 @@ Dynamic: summary
26
27
 
27
28
  # MeshKit for Python
28
29
 
30
+ Documentation: <https://www.hydrocouple.org/Meshkit/python/> (guides and API reference).
31
+
29
32
  MeshKit 0.2 builds independently with C++17 and Python headers. No Qt, OpenSWMM,
30
33
  GDAL, NumPy headers, binding generator or network fetch is required by its CMake
31
34
  build. NumPy is optional at runtime. License: Apache-2.0; robust predicates retain
@@ -52,7 +55,7 @@ meshkit.write("result.mkb", result) # No replacement unless explicitly requ
52
55
  ```
53
56
 
54
57
  `meshkit.start(request, raster=..., provider_identity=...)` returns a native job
55
- with `poll()`, `cancel()`, `done`, and `result(timeout_seconds=-1)`. Jobs run without
58
+ with `poll()`, `cancel()`, `done`, and `result(timeout=-1)` (timeout in seconds, positional). Jobs run without
56
59
  the Python GIL; progress callbacks in `run` execute on the caller thread. Dropping
57
60
  a job requests cancellation. No Python callback runs for each cell. Inputs copy
58
61
  into native owned storage once; strided float64 point buffers are supported.
@@ -13,6 +13,8 @@ MeshKit is an independently configurable, buildable and installable CMake projec
13
13
 
14
14
  The `_qt` names make the remaining transitional API explicit. These targets do not depend on Qt Widgets, the OpenSWMM application, the simulation engine, GDAL, or Python. **`runtime`, `core`, and `io` are Qt-free.** The native job supports triangles and jointly planned mapped/automatic mixed meshes. The Qt planning, patch, sizing and constraint facades delegate to the same standard C++ implementations. The GUI retains terrain/GIS capture, legacy free quad matching and project orchestration. The native and Qt triangulation specializations share one algorithm implementation, with no GUI working-array mirror. See [the native API contract](NATIVE_API.md) for units, ownership, capabilities, error reporting, file schemas and examples.
15
15
 
16
+ Documentation: the [C++ API reference](https://www.hydrocouple.org/Meshkit/) and the [Python package documentation](https://www.hydrocouple.org/Meshkit/python/).
17
+
16
18
  ## Build and use
17
19
 
18
20
  ```sh
@@ -41,7 +43,7 @@ set(MESHKIT_BUILD_QT OFF CACHE BOOL "" FORCE) # Qt-free core, io and runtime
41
43
  set(MESHKIT_BUILD_TESTS OFF CACHE BOOL "" FORCE)
42
44
  FetchContent_Declare(MeshKit
43
45
  GIT_REPOSITORY https://github.com/HydroCouple/Meshkit.git
44
- GIT_TAG v0.2.0
46
+ GIT_TAG v0.3.0
45
47
  GIT_SHALLOW TRUE)
46
48
  FetchContent_MakeAvailable(MeshKit)
47
49
  target_link_libraries(my_mesher PRIVATE meshkit::core meshkit::io)
@@ -154,7 +156,7 @@ cancellation or exhausted required budget returns no partial plan. Optional sour
154
156
  can fall back to triangles. Geometry/certification callbacks are immutable and execute
155
157
  synchronously on the job thread.
156
158
 
157
- Fixed-boundary neighbour sizes let CDT repair oversized adjacent triangles using
159
+ Fixed-boundary neighbor sizes let CDT repair oversized adjacent triangles using
158
160
  storage proportional to patch perimeter. An independent delivered-interface audit
159
161
  checks actual nominal ratios. Up to three exceptional regenerations can omit preferred
160
162
  patches or refine required generated stations. Immutable fixed patches fail with an
@@ -207,7 +209,7 @@ uses `coarseningReferenceSize` for ordering; it does not invent a size cap.
207
209
  Normals remain an ordering signal, never a terrain error certificate.
208
210
 
209
211
  `<mesh/coarseningqueue.h>` maintains one live entry per vertex and preallocates the
210
- known free-slot ceiling. Reconsidering neighbours updates an existing entry rather
212
+ known free-slot ceiling. Reconsidering neighbors updates an existing entry rather
211
213
  than accumulating stale heap entries. Morton tiles retain locality and the pass
212
214
  remains serial. Topology, original input/constraint/pin protection, shortest-edge,
213
215
  angle, nominal/full-footprint size and terrain certificate gates remain separate.
@@ -250,3 +252,15 @@ These synthetic probes exclude terrain/GIS, mixed patch planning and rendering.
250
252
  ## Completion validation
251
253
 
252
254
  The full mixed job produced **7,123,030 vertices and 7,983,065 cells** (6,250,000 quads plus 1,733,065 triangles) in 18.79 s, at 1,862,631,424 bytes process peak RSS on this Apple arm64 workstation. It includes 100 mapped patches, a hole, junction/shared reversed line owners, a bilinear terrain certificate, and final source/size/edge/transition checks, all passing. This synthetic terrain case excludes GUI rendering and is not a worst-case guarantee. The supplied Bellinge boundary/DEM also passes a separate mixed job. See [validation](VALIDATION.md) for scope and reproducible evidence.
255
+
256
+ ## Browser bindings
257
+
258
+ With Emscripten enabled, run `npm --prefix wasm run build` and `npm --prefix wasm test`.
259
+ The optional `@hydrocouple/meshkit-wasm` ES module and its WASM binary are built
260
+ under `wasm/dist`. Load the module in a worker and call `runJob` with a planar
261
+ domain, holes or pre-noded breaklines, target triangle size and a node-sampled
262
+ elevation raster in metres. Path kinds 0–3 denote outer, hole, line and region.
263
+ Raster rows increase toward positive Y. Check the returned status before using
264
+ the owned XYZ, triangle, tagged edge and source vertex buffers. The public types
265
+ are in `wasm/index.d.ts`. Each worker owns its module and can be terminated to
266
+ cancel a synchronous job.
@@ -22,7 +22,7 @@ if(MSVC)
22
22
  endif()
23
23
 
24
24
 
25
- add_library(meshkit_core STATIC src/native/cdt.cpp src/native/mesh.cpp src/native/job.cpp src/native/patch.cpp src/native/regions.cpp src/native/planning.cpp src/native/sizefield.cpp src/native/blocks.cpp src/native/constraints.cpp src/native/constraintshared.cpp src/native/constraintaudit.cpp src/native/raster.cpp)
25
+ add_library(meshkit_core STATIC src/native/cdt.cpp src/native/mesh.cpp src/native/job.cpp src/native/patch.cpp src/native/regions.cpp src/native/planning.cpp src/native/sizefield.cpp src/native/blocks.cpp src/native/constraints.cpp src/native/constraintshared.cpp src/native/constraintaudit.cpp src/native/raster.cpp src/native/terrainblocks.cpp src/native/terrainlines.cpp)
26
26
  add_library(meshkit::core ALIAS meshkit_core)
27
27
  set_target_properties(meshkit_core PROPERTIES EXPORT_NAME core POSITION_INDEPENDENT_CODE ON AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
28
28
  target_compile_features(meshkit_core PUBLIC cxx_std_17)
@@ -240,8 +240,8 @@ struct RingPolygon {
240
240
 
241
241
  /*! \brief Validity classes for a RingPolygon (in-house checks, no GEOS). */
242
242
  enum class RingValidity {
243
- Ok,
244
- TooFewVertices, ///< Exterior or a hole has < 3 vertices.
243
+ Ok, ///< Every check passed.
244
+ TooFewVertices, ///< Exterior or a hole has < 3 vertices.
245
245
  SelfIntersecting, ///< Exterior or a hole crosses itself.
246
246
  HoleOutsideExterior, ///< A hole escapes / crosses the exterior.
247
247
  HolesOverlap ///< Two holes overlap or nest.
@@ -29,9 +29,11 @@
29
29
  namespace mesh
30
30
  {
31
31
 
32
+ /*! \brief Detection policy for findFacingPairs(). Lengths are in map (XY) units. With the
33
+ * zero defaults the width/station check fails and no pairs are returned. */
32
34
  struct FacingPairOptions {
33
35
  double minWidth = 0.0; ///< Separation range, map units (maxWidth > minWidth > 0).
34
- double maxWidth = 0.0;
36
+ double maxWidth = 0.0; ///< Upper end of that range: how far each normal ray is cast.
35
37
  double station = 0.0; ///< Sampling step along each line, map units (> 0).
36
38
  double maxAngleDeg = 20.0; ///< Largest angle between the two lines at a station.
37
39
  double widthChange =
@@ -45,8 +47,13 @@ struct FacingPairOptions {
45
47
  std::function<double(double, double)> elevationAt;
46
48
  };
47
49
 
50
+ /*! \brief One facing run found by findFacingPairs(). */
48
51
  struct FacingPair {
52
+ /** @var lineA
53
+ * Index of the line whose stations cast the rays (side A). */
49
54
  int lineA = -1, lineB = -1; ///< Indices into the input lines.
55
+ /** @var bankA
56
+ * The facing portion of line lineA, in that line's direction (>= 2 points). */
50
57
  QVector<QPointF> bankA, bankB; ///< The facing portions: A in A's direction, B in B's.
51
58
  double width = 0.0; ///< Median separation.
52
59
  double length = 0.0; ///< Along A.
@@ -0,0 +1,250 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ #pragma once
3
+ #include "meshquadregion.h"
4
+ #include "meshpatch.h"
5
+ #include <functional>
6
+
7
+ namespace mesh
8
+ {
9
+ /** @enum PatchDisposition
10
+ * @brief Final outcome of one quad region in unified cell planning.
11
+ * @var PatchDisposition::Triangles
12
+ * @brief No patch is delivered; the region is meshed with triangles. The default.
13
+ * @var PatchDisposition::Accepted
14
+ * @brief The mapped patch passed every check without repair.
15
+ * @var PatchDisposition::Repaired
16
+ * @brief The mapped patch passed after its station counts were refined.
17
+ * @var PatchDisposition::RequiredFailure
18
+ * @brief A required region could not be planned; the whole plan fails. */
19
+ enum class PatchDisposition { Triangles, Accepted, Repaired, RequiredFailure };
20
+ /** @brief Per-region planning record explaining the disposition chosen by planQuadRegions(). */
21
+ struct PatchDecision {
22
+ /** @var source
23
+ * @brief Region tag, or "region:<i>" with the zero-based index when the tag is empty.
24
+ * @var reason
25
+ * @brief English explanation: the acceptance note, the refusal or priority reason, or the
26
+ * last repairable failure. */
27
+ QString source, reason;
28
+ int region = -1; ///< Zero-based index into the planned regions; -1 when not assigned.
29
+ bool required = false; ///< QuadRegion::requireMapped or directionalSpacing was set.
30
+ PatchDisposition disposition = PatchDisposition::Triangles; ///< @brief Final outcome.
31
+ /// @brief n x m cell count at the patch's last successful assessment; 0 if none passed. Not
32
+ /// reset when a later shared-side check refuses the patch, so read it with disposition.
33
+ quint64 cells = 0;
34
+ int repairRounds = 0; ///< Station-doubling rounds the delivered patch needed; 0 otherwise.
35
+ };
36
+ /**
37
+ * @brief Acceptance limits for one mapped patch, checked cell by cell by assessPlannedPatch().
38
+ *
39
+ * Lengths are XY lengths in the patch's planar units; terrain tolerances use the units of
40
+ * elevationAt and terrainBound. Comparisons carry a small relative tolerance (1e-9, or 1e-10
41
+ * for terrain error). Callbacks run synchronously on the calling thread.
42
+ */
43
+ struct PatchLimits {
44
+ /** @var minimumEdge
45
+ * @brief Shortest allowed cell edge; 0 disables. A violation is not repairable.
46
+ * @var minimumAngleDegrees
47
+ * @brief Smallest allowed interior angle in degrees, in [0, 180); 0 disables.
48
+ * @var maximumAspect
49
+ * @brief Largest allowed quad aspect ratio as computed by quadQuality(); 0 disables. */
50
+ double minimumEdge = 0, minimumAngleDegrees = 0, maximumAspect = 0;
51
+ /** @var alongSize
52
+ * @brief Limit on the mean length of the opposite edge pair best aligned with
53
+ * alongAngleDegrees; 0 disables the directional check. Zero exactly when acrossSize is.
54
+ * @var acrossSize
55
+ * @brief Limit on the mean length of the other opposite edge pair; 0 disables.
56
+ * @var alongAngleDegrees
57
+ * @brief Undirected along axis in degrees counterclockwise from +x; must be finite. */
58
+ double alongSize = 0, acrossSize = 0, alongAngleDegrees = 0;
59
+ /// @brief Constant terrain error tolerance, used when terrainToleranceForFootprint is unset.
60
+ /// Terrain checks run only when it is positive or that callback is set.
61
+ double terrainTolerance = 0;
62
+ /// @brief Optional tolerance for a cell's XY bounding box; replaces terrainTolerance and
63
+ /// must return a finite positive value.
64
+ std::function<double(const QRectF &)> terrainToleranceForFootprint;
65
+ /// @brief Optional size cap for a cell's XY bounding box, compared with sqrt(cell area);
66
+ /// 0 means no cap, a negative or nonfinite value fails the patch.
67
+ std::function<double(const QRectF &)> maximumSize;
68
+ /// @brief Terrain elevation at (x, y), sampled at the quad corners; required by terrain
69
+ /// checks. A nonfinite value means unknown coverage and fails the patch.
70
+ std::function<double(double, double)> elevationAt;
71
+ /// @brief Certified terrain error bound of the planar triangle through three XY points and
72
+ /// heights (arrays valid only during the call); each quad is checked as triangles 0-1-2 and
73
+ /// 0-2-3. Required by terrain checks; must return a finite value >= 0.
74
+ std::function<double(const QPointF *, const double *)> terrainBound;
75
+ /// Optional cancellation poll; planQuadRegions() also uses it as its cancellation source.
76
+ std::function<bool()> cancelled;
77
+ };
78
+ /** @brief Result of assessPlannedPatch(). */
79
+ struct PatchAssessment {
80
+ /** @var ok
81
+ * @brief Every cell met every limit.
82
+ * @var repairable
83
+ * @brief When ok is false: finer stations may fix the failure (angle, aspect, directional
84
+ * spacing, footprint size or terrain error exceeded). False for invalid limits or cells,
85
+ * a short edge, unknown terrain coverage or cancellation.
86
+ * @var cancelled
87
+ * @brief PatchLimits::cancelled returned true. */
88
+ bool ok = false, repairable = false, cancelled = false;
89
+ QString reason; ///< English reason for the first failure; empty when ok.
90
+ };
91
+ /**
92
+ * @brief Check a generated mapped patch cell by cell against acceptance limits.
93
+ *
94
+ * The first argument is the patch, read only; it must have cells, and every cell must be a
95
+ * quad with in-range vertex indices, finite coordinates and a convex, positive-area shape. The
96
+ * second argument holds the limits, validated first: finite nonnegative values,
97
+ * minimumAngleDegrees below 180, a finite alongAngleDegrees, and alongSize and acrossSize
98
+ * either both positive or both zero. Checking stops at the first failing cell. Cancellation
99
+ * is polled every 1024 cells; callbacks run synchronously on the calling thread.
100
+ * @return Owned assessment; reason names the first failure.
101
+ */
102
+ PatchAssessment assessPlannedPatch(const PatchMesh &, const PatchLimits &);
103
+ /** @brief Settings and budgets for planQuadRegions(). */
104
+ struct QuadPlanningOptions {
105
+ bool allowQuads = true; ///< @brief False refuses all regions: global triangles-only priority.
106
+ /// Spacing for regions without a positive QuadRegion::spacing; finite and positive.
107
+ double defaultSize = 1;
108
+ /// @brief Limits for every candidate patch; a region's aspectMax, isotropic spacing and
109
+ /// directional spacing override them per region. Its callback is the cancellation poll.
110
+ PatchLimits limits;
111
+ /// Rounds that double station counts after repairable failures; valid range [0, 3].
112
+ int maximumRepairRounds = 3;
113
+ /** @var maximumCells
114
+ * @brief Cell budget over all planned patches; also bounds side subdivision counts.
115
+ * @var maximumPatchCells
116
+ * @brief Cell limit for a single patch. */
117
+ quint64 maximumCells = 20000000, maximumPatchCells = 250000;
118
+ /** @var maximumWorkspaceBytes
119
+ * @brief Estimated limit for the source index, stations and planned cells (2 GiB by
120
+ * default); not a bound on total process memory.
121
+ * @var workBudget
122
+ * @brief Work-unit limit; 0 selects 512 per maximumCells plus 100,000. */
123
+ quint64 maximumWorkspaceBytes = quint64(2) << 30, workBudget = 0;
124
+ // Previous bounded conformity retry found this candidate unsafe.
125
+ /// Optional veto given a candidate's ordered patch boundary; returning true refuses it.
126
+ std::function<bool(const QPolygonF &)> excluded;
127
+ };
128
+ /**
129
+ * @brief Source geometry that protects against planned patches, in the regions' XY frame.
130
+ * Coordinates must be finite. Source vertices lying on a region side become required stations.
131
+ */
132
+ struct QuadPlanningGeometry {
133
+ /** @var domains
134
+ * @brief Domain rings; a patch must lie inside one (tested at its first cell's centroid)
135
+ * and no domain edge may cross or enter it.
136
+ * @var holes
137
+ * @brief Hole rings; they take priority over any patch. */
138
+ QVector<QPolygonF> domains, holes;
139
+ /// Protected open polylines; they may run along a patch boundary but not enter or cross it.
140
+ QVector<QVector<QPointF>> lines;
141
+ /// Protected points; one inside or on a patch must coincide with a generated vertex.
142
+ QVector<QPointF> pins;
143
+ /// Existing patches; their boundaries (orderedPatchBoundary()) take priority like holes.
144
+ QVector<PatchMesh> fixedPatches;
145
+ };
146
+ /** @brief Result of planQuadRegions(). On failure patches is empty; decisions are kept. */
147
+ struct QuadPlan {
148
+ /** @var ok
149
+ * @brief Planning finished and every required region has a patch.
150
+ * @var cancelled
151
+ * @brief Cancellation was observed; ok is false.
152
+ * @var resourceLimited
153
+ * @brief A work, workspace or cell budget stopped the plan or refused a required region. */
154
+ bool ok = false, cancelled = false, resourceLimited = false;
155
+ QString error; ///< @brief English reason when ok is false; empty on success.
156
+ /// Delivered patches with CCW quads, required regions first, then in region order.
157
+ QVector<PatchMesh> patches;
158
+ QVector<int> patchRegions; ///< Zero-based region index of each entry in patches.
159
+ QVector<PatchDecision> decisions; ///< One decision per input region, in input order.
160
+ /** @var sharedSides
161
+ * @brief Region sides that matched an already registered identical side path.
162
+ * @var workUsed
163
+ * @brief Work units consumed.
164
+ * @var plannedCells
165
+ * @brief Total quads over patches. */
166
+ quint64 sharedSides = 0, workUsed = 0, plannedCells = 0;
167
+ };
168
+ // Plan all region patches together before CDT construction. Full shared sides
169
+ // use one exact station sequence; opposite/shared counts are solved jointly.
170
+ // Authored vertices and indexed source junctions are retained. Unknown/infeasible
171
+ // preferred candidates use triangles; a required failure refuses the whole plan.
172
+ /**
173
+ * @brief Plan mapped quad patches for all regions jointly, before CDT construction.
174
+ *
175
+ * The arguments, all read only, are the regions, the protecting source geometry and the
176
+ * options. A region is a candidate unless quads are disabled globally or by
177
+ * QuadRegionMode::TrianglesOnly, and only when its ring has at least three vertices, nonzero
178
+ * area and exactly four corners: QuadRegion::corners (strictly increasing ring indices) or,
179
+ * when empty, the vertices turning more than 30 degrees. Each side follows the ring between
180
+ * corners with every source vertex on it inserted; opposite sides and identical shared sides
181
+ * get one station count, at least ceil(length / spacing) and never fewer than their segments.
182
+ * Spacing is QuadRegion::spacing or defaultSize (directional spacing by side alignment),
183
+ * scaled down to limits.maximumSize over the ring's bounding box. A candidate is refused when
184
+ * excluded, outside the domain, inside a hole, fixed patch or triangles-only region, crossed
185
+ * or entered by source geometry, duplicating another boundary, or failing
186
+ * assessPlannedPatch(); repairable failures double the counts of its sides for up to
187
+ * maximumRepairRounds rounds. Required regions are processed first; finally a patch whose
188
+ * boundary vertex lies inside another patch's boundary edge is refused, the later one.
189
+ * @return Owned plan. A refused optional region keeps PatchDisposition::Triangles with its
190
+ * reason. A refused required region, invalid settings or input, cancellation or an exhausted
191
+ * work, source-index, station or subdivision budget give ok false with error set and no
192
+ * patches. Callbacks run synchronously on the calling thread.
193
+ */
194
+ QuadPlan planQuadRegions(const QVector<QuadRegion> &, const QuadPlanningGeometry &,
195
+ const QuadPlanningOptions & = {});
196
+ /** @brief One interface face whose nominal-size ratio exceeds the limit. */
197
+ struct PatchInterfaceConflict {
198
+ /** @var first
199
+ * @brief Lower MeshResult::triangles index of the two incident cells.
200
+ * @var second
201
+ * @brief Higher MeshResult::triangles index of the two incident cells. */
202
+ int first = -1, second = -1;
203
+ /** @var firstSize
204
+ * @brief Nominal size of cell first (XY length).
205
+ * @var secondSize
206
+ * @brief Nominal size of cell second (XY length). */
207
+ double firstSize = 0, secondSize = 0;
208
+ };
209
+ /** @brief Result of auditPatchInterfaces(). */
210
+ struct PatchInterfaceReport {
211
+ /** @var ok
212
+ * @brief The audit completed on valid input; violations may still be present.
213
+ * @var cancelled
214
+ * @brief Cancellation was observed; ok is false. */
215
+ bool ok = false, cancelled = false;
216
+ QString error; ///< English reason when ok is false; empty otherwise.
217
+ /** @var sharedFaces
218
+ * @brief Interface edges with exactly two incident cells.
219
+ * @var violations
220
+ * @brief Shared faces whose size ratio exceeds the limit. */
221
+ quint64 sharedFaces = 0, violations = 0;
222
+ double largestRatio = 1; ///< @brief Largest size ratio over shared faces; 1 when none.
223
+ /// Up to maximumExamples violations, sorted by cell indices.
224
+ QVector<PatchInterfaceConflict> examples;
225
+ };
226
+ // Compact independent incidence/ratio check restricted to actual patch edges.
227
+ // Ordinary triangles are scanned once; storage grows with patch perimeter.
228
+ /**
229
+ * @brief Measure nominal-size ratios across delivered patch interface edges.
230
+ *
231
+ * Nominal size is sqrt(4A / sqrt(3)) for a triangle and sqrt(A) for a quad, from the signed
232
+ * XY area, so every cell must be counterclockwise. An edge with two incident cells is a shared
233
+ * face; an edge with one is skipped. The parameters are unnamed in this declaration; the names
234
+ * below are the definition's.
235
+ * @param[in] m The delivered mesh; read only.
236
+ * @param[in] edges Patch boundary edges as vertex index pairs into the mesh's vertices
237
+ * (direction and marker ignored); read only.
238
+ * @param[in] maximumRatio Largest allowed ratio of the two nominal sizes; finite and >= 1.
239
+ * @param[in] cancelled Optional poll, called synchronously about every 4096 cells.
240
+ * @param[in] maximumExamples Violations to report, clamped to [0, 1000]; those with the
241
+ * smallest cell indices are kept.
242
+ * @return Owned report. ok is false with error set for an invalid ratio, edge or cell, a
243
+ * nonpositive cell area, a face with more than two cells, a boundary edge without any cell,
244
+ * or cancellation. Violations do not make ok false.
245
+ */
246
+ PatchInterfaceReport auditPatchInterfaces(const MeshResult &, const QVector<MeshEdge> &,
247
+ double maximumRatio,
248
+ const std::function<bool()> &cancelled = {},
249
+ int maximumExamples = 64);
250
+ }