hydrocouple.meshkit 0.0.0.dev0__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 (169) hide show
  1. hydrocouple_meshkit-0.3.0/CHANGELOG.md +125 -0
  2. hydrocouple_meshkit-0.3.0/CMakeLists.txt +140 -0
  3. hydrocouple_meshkit-0.3.0/LICENSE +202 -0
  4. hydrocouple_meshkit-0.3.0/MANIFEST.in +8 -0
  5. hydrocouple_meshkit-0.3.0/NATIVE_API.md +185 -0
  6. hydrocouple_meshkit-0.3.0/NOTICE +12 -0
  7. hydrocouple_meshkit-0.3.0/PKG-INFO +92 -0
  8. hydrocouple_meshkit-0.3.0/PROVENANCE.md +74 -0
  9. hydrocouple_meshkit-0.3.0/README.md +266 -0
  10. hydrocouple_meshkit-0.3.0/RELICENSING.md +19 -0
  11. hydrocouple_meshkit-0.3.0/VALIDATION.md +212 -0
  12. hydrocouple_meshkit-0.3.0/cmake/CoreTargets.cmake +44 -0
  13. hydrocouple_meshkit-0.3.0/cmake/MeshKitConfig.cmake.in +23 -0
  14. hydrocouple_meshkit-0.3.0/cmake/PythonTargets.cmake +10 -0
  15. hydrocouple_meshkit-0.3.0/cmake/QtTargets.cmake +57 -0
  16. hydrocouple_meshkit-0.3.0/include/core/editgeometry.h +260 -0
  17. hydrocouple_meshkit-0.3.0/include/mesh/breaklinestrips.h +104 -0
  18. hydrocouple_meshkit-0.3.0/include/mesh/cellplanner.h +250 -0
  19. hydrocouple_meshkit-0.3.0/include/mesh/coarseningqueue.h +6 -0
  20. hydrocouple_meshkit-0.3.0/include/mesh/constraintaudit.h +151 -0
  21. hydrocouple_meshkit-0.3.0/include/mesh/constraintpreview.h +103 -0
  22. hydrocouple_meshkit-0.3.0/include/mesh/constraintsimplifier.h +254 -0
  23. hydrocouple_meshkit-0.3.0/include/mesh/inpmeshreader.h +141 -0
  24. hydrocouple_meshkit-0.3.0/include/mesh/inpmeshwriter.h +648 -0
  25. hydrocouple_meshkit-0.3.0/include/mesh/meshbctype.h +116 -0
  26. hydrocouple_meshkit-0.3.0/include/mesh/meshcdt.h +12 -0
  27. hydrocouple_meshkit-0.3.0/include/mesh/meshcellgeom.h +424 -0
  28. hydrocouple_meshkit-0.3.0/include/mesh/meshcellparams.h +148 -0
  29. hydrocouple_meshkit-0.3.0/include/mesh/meshcellstats.h +276 -0
  30. hydrocouple_meshkit-0.3.0/include/mesh/meshedgebc.h +77 -0
  31. hydrocouple_meshkit-0.3.0/include/mesh/meshedgekey.h +41 -0
  32. hydrocouple_meshkit-0.3.0/include/mesh/meshgenerator.h +696 -0
  33. hydrocouple_meshkit-0.3.0/include/mesh/meshinfil.h +479 -0
  34. hydrocouple_meshkit-0.3.0/include/mesh/meshpatch.h +181 -0
  35. hydrocouple_meshkit-0.3.0/include/mesh/meshprogress.h +6 -0
  36. hydrocouple_meshkit-0.3.0/include/mesh/meshquadcleanup.h +127 -0
  37. hydrocouple_meshkit-0.3.0/include/mesh/meshquadmatch.h +156 -0
  38. hydrocouple_meshkit-0.3.0/include/mesh/meshquadquality.h +319 -0
  39. hydrocouple_meshkit-0.3.0/include/mesh/meshquadregion.h +316 -0
  40. hydrocouple_meshkit-0.3.0/include/mesh/meshreorder.h +73 -0
  41. hydrocouple_meshkit-0.3.0/include/mesh/meshresolution.h +311 -0
  42. hydrocouple_meshkit-0.3.0/include/mesh/meshresult.h +297 -0
  43. hydrocouple_meshkit-0.3.0/include/mesh/naturalnbinterpolator.h +283 -0
  44. hydrocouple_meshkit-0.3.0/include/mesh/pslgprep.h +514 -0
  45. hydrocouple_meshkit-0.3.0/include/mesh/qtcdtstorage.h +45 -0
  46. hydrocouple_meshkit-0.3.0/include/mesh/qtnative.h +1122 -0
  47. hydrocouple_meshkit-0.3.0/include/mesh/quadblocks.h +128 -0
  48. hydrocouple_meshkit-0.3.0/include/mesh/sizefield.h +273 -0
  49. hydrocouple_meshkit-0.3.0/include/mesh/sizingaudit.h +137 -0
  50. hydrocouple_meshkit-0.3.0/include/mesh/sms2dmreader.h +91 -0
  51. hydrocouple_meshkit-0.3.0/include/mesh/terrainpolicy.h +9 -0
  52. hydrocouple_meshkit-0.3.0/include/meshkit/blocks.hpp +144 -0
  53. hydrocouple_meshkit-0.3.0/include/meshkit/cdt.hpp +947 -0
  54. hydrocouple_meshkit-0.3.0/include/meshkit/coarseningqueue.hpp +135 -0
  55. hydrocouple_meshkit-0.3.0/include/meshkit/constraintaudit.hpp +148 -0
  56. hydrocouple_meshkit-0.3.0/include/meshkit/constraints.hpp +279 -0
  57. hydrocouple_meshkit-0.3.0/include/meshkit/detail/planmodel.hpp +337 -0
  58. hydrocouple_meshkit-0.3.0/include/meshkit/detail/storage.hpp +517 -0
  59. hydrocouple_meshkit-0.3.0/include/meshkit/events.hpp +282 -0
  60. hydrocouple_meshkit-0.3.0/include/meshkit/geometry.hpp +324 -0
  61. hydrocouple_meshkit-0.3.0/include/meshkit/io.hpp +133 -0
  62. hydrocouple_meshkit-0.3.0/include/meshkit/job.hpp +570 -0
  63. hydrocouple_meshkit-0.3.0/include/meshkit/mesh.hpp +291 -0
  64. hydrocouple_meshkit-0.3.0/include/meshkit/patch.hpp +188 -0
  65. hydrocouple_meshkit-0.3.0/include/meshkit/planning.hpp +295 -0
  66. hydrocouple_meshkit-0.3.0/include/meshkit/progress.hpp +43 -0
  67. hydrocouple_meshkit-0.3.0/include/meshkit/quadquality.hpp +317 -0
  68. hydrocouple_meshkit-0.3.0/include/meshkit/raster.hpp +111 -0
  69. hydrocouple_meshkit-0.3.0/include/meshkit/regions.hpp +302 -0
  70. hydrocouple_meshkit-0.3.0/include/meshkit/sizefield.hpp +356 -0
  71. hydrocouple_meshkit-0.3.0/include/meshkit/terrainblocks.hpp +55 -0
  72. hydrocouple_meshkit-0.3.0/include/meshkit/terrainlines.hpp +107 -0
  73. hydrocouple_meshkit-0.3.0/include/meshkit/terrainpolicy.hpp +109 -0
  74. hydrocouple_meshkit-0.3.0/pyproject.toml +19 -0
  75. hydrocouple_meshkit-0.3.0/python/README.md +65 -0
  76. hydrocouple_meshkit-0.3.0/python/docs/_hydrocouple/hydrocouple_theme.py +135 -0
  77. hydrocouple_meshkit-0.3.0/python/docs/_intersphinx/README.md +32 -0
  78. hydrocouple_meshkit-0.3.0/python/docs/conf.py +187 -0
  79. hydrocouple_meshkit-0.3.0/python/hydrocouple.meshkit.egg-info/PKG-INFO +92 -0
  80. hydrocouple_meshkit-0.3.0/python/hydrocouple.meshkit.egg-info/SOURCES.txt +161 -0
  81. hydrocouple_meshkit-0.3.0/python/hydrocouple.meshkit.egg-info/not-zip-safe +1 -0
  82. hydrocouple_meshkit-0.3.0/python/hydrocouple.meshkit.egg-info/requires.txt +3 -0
  83. hydrocouple_meshkit-0.3.0/python/meshkit/__init__.py +89 -0
  84. hydrocouple_meshkit-0.3.0/python/meshkit/_meshkit.pyi +285 -0
  85. hydrocouple_meshkit-0.3.0/setup.py +46 -0
  86. hydrocouple_meshkit-0.3.0/src/core/editgeometry.cpp +450 -0
  87. hydrocouple_meshkit-0.3.0/src/mesh/breaklinestrips.cpp +413 -0
  88. hydrocouple_meshkit-0.3.0/src/mesh/cellplanner.cpp +9 -0
  89. hydrocouple_meshkit-0.3.0/src/mesh/constraintaudit.cpp +8 -0
  90. hydrocouple_meshkit-0.3.0/src/mesh/constraintpreview.cpp +88 -0
  91. hydrocouple_meshkit-0.3.0/src/mesh/constraintshared.cpp +7 -0
  92. hydrocouple_meshkit-0.3.0/src/mesh/constraintsimplifier.cpp +10 -0
  93. hydrocouple_meshkit-0.3.0/src/mesh/inpmeshreader.cpp +1637 -0
  94. hydrocouple_meshkit-0.3.0/src/mesh/inpmeshwriter.cpp +1659 -0
  95. hydrocouple_meshkit-0.3.0/src/mesh/meshbctype.cpp +107 -0
  96. hydrocouple_meshkit-0.3.0/src/mesh/meshcdt.cpp +5 -0
  97. hydrocouple_meshkit-0.3.0/src/mesh/meshcellparams.cpp +423 -0
  98. hydrocouple_meshkit-0.3.0/src/mesh/meshcellstats.cpp +491 -0
  99. hydrocouple_meshkit-0.3.0/src/mesh/meshgenerator.cpp +3816 -0
  100. hydrocouple_meshkit-0.3.0/src/mesh/meshinfil.cpp +673 -0
  101. hydrocouple_meshkit-0.3.0/src/mesh/meshpatch.cpp +17 -0
  102. hydrocouple_meshkit-0.3.0/src/mesh/meshquadcleanup.cpp +736 -0
  103. hydrocouple_meshkit-0.3.0/src/mesh/meshquadmatch.cpp +530 -0
  104. hydrocouple_meshkit-0.3.0/src/mesh/meshquadregion.cpp +17 -0
  105. hydrocouple_meshkit-0.3.0/src/mesh/meshreorder.cpp +170 -0
  106. hydrocouple_meshkit-0.3.0/src/mesh/naturalnbinterpolator.cpp +493 -0
  107. hydrocouple_meshkit-0.3.0/src/mesh/pslgprep.cpp +917 -0
  108. hydrocouple_meshkit-0.3.0/src/mesh/quadblocks.cpp +27 -0
  109. hydrocouple_meshkit-0.3.0/src/mesh/sizefield.cpp +12 -0
  110. hydrocouple_meshkit-0.3.0/src/mesh/sizingaudit.cpp +212 -0
  111. hydrocouple_meshkit-0.3.0/src/mesh/sms2dmreader.cpp +256 -0
  112. hydrocouple_meshkit-0.3.0/src/native/binaryio.cpp +265 -0
  113. hydrocouple_meshkit-0.3.0/src/native/blocks.cpp +335 -0
  114. hydrocouple_meshkit-0.3.0/src/native/cdt.cpp +2 -0
  115. hydrocouple_meshkit-0.3.0/src/native/cdt_impl.hpp +2553 -0
  116. hydrocouple_meshkit-0.3.0/src/native/constraintaudit.cpp +823 -0
  117. hydrocouple_meshkit-0.3.0/src/native/constraints.cpp +570 -0
  118. hydrocouple_meshkit-0.3.0/src/native/constraintshared.cpp +409 -0
  119. hydrocouple_meshkit-0.3.0/src/native/file.hpp +494 -0
  120. hydrocouple_meshkit-0.3.0/src/native/job.cpp +3243 -0
  121. hydrocouple_meshkit-0.3.0/src/native/mesh.cpp +152 -0
  122. hydrocouple_meshkit-0.3.0/src/native/mixed.hpp +349 -0
  123. hydrocouple_meshkit-0.3.0/src/native/operation.hpp +212 -0
  124. hydrocouple_meshkit-0.3.0/src/native/patch.cpp +1551 -0
  125. hydrocouple_meshkit-0.3.0/src/native/planning.cpp +933 -0
  126. hydrocouple_meshkit-0.3.0/src/native/python.cpp +1379 -0
  127. hydrocouple_meshkit-0.3.0/src/native/raster.cpp +181 -0
  128. hydrocouple_meshkit-0.3.0/src/native/regionlimits.hpp +101 -0
  129. hydrocouple_meshkit-0.3.0/src/native/regions.cpp +558 -0
  130. hydrocouple_meshkit-0.3.0/src/native/sizefield.cpp +521 -0
  131. hydrocouple_meshkit-0.3.0/src/native/smsio.cpp +490 -0
  132. hydrocouple_meshkit-0.3.0/src/native/sourcechains.hpp +161 -0
  133. hydrocouple_meshkit-0.3.0/src/native/terrainblocks.cpp +154 -0
  134. hydrocouple_meshkit-0.3.0/src/native/terrainlines.cpp +464 -0
  135. hydrocouple_meshkit-0.3.0/tests/cellplanner_test.cpp +324 -0
  136. hydrocouple_meshkit-0.3.0/tests/constraints_test.cpp +469 -0
  137. hydrocouple_meshkit-0.3.0/tests/inp_read_probe.cpp +230 -0
  138. hydrocouple_meshkit-0.3.0/tests/kernel_parity_test.cpp +20 -0
  139. hydrocouple_meshkit-0.3.0/tests/make_inp_mesh_fixture.py +131 -0
  140. hydrocouple_meshkit-0.3.0/tests/mesher_io_test.cpp +76 -0
  141. hydrocouple_meshkit-0.3.0/tests/mixed_scale_probe.py +50 -0
  142. hydrocouple_meshkit-0.3.0/tests/native_core_test.cpp +43 -0
  143. hydrocouple_meshkit-0.3.0/tests/native_io_test.cpp +212 -0
  144. hydrocouple_meshkit-0.3.0/tests/native_mixed_test.cpp +774 -0
  145. hydrocouple_meshkit-0.3.0/tests/native_scale_probe.cpp +42 -0
  146. hydrocouple_meshkit-0.3.0/tests/python_test.py +136 -0
  147. hydrocouple_meshkit-0.3.0/tests/raster_test.cpp +11 -0
  148. hydrocouple_meshkit-0.3.0/tests/runtime_test.cpp +62 -0
  149. hydrocouple_meshkit-0.3.0/tests/scale_probe.cpp +163 -0
  150. hydrocouple_meshkit-0.3.0/tests/sizing_test.cpp +230 -0
  151. hydrocouple_meshkit-0.3.0/tests/terrainblocks_test.cpp +89 -0
  152. hydrocouple_meshkit-0.3.0/tests/terrainjob_test.cpp +610 -0
  153. hydrocouple_meshkit-0.3.0/tests/terrainlines_test.cpp +191 -0
  154. hydrocouple_meshkit-0.3.0/tests/test_meshcdt.cpp +1137 -0
  155. hydrocouple_meshkit-0.3.0/tests/test_meshgenerator_v2.cpp +1247 -0
  156. hydrocouple_meshkit-0.3.0/tests/thinning_test.cpp +313 -0
  157. hydrocouple_meshkit-0.3.0/tools/meshkit.cpp +27 -0
  158. hydrocouple_meshkit-0.3.0/vendor/predicates/LICENSE +9 -0
  159. hydrocouple_meshkit-0.3.0/vendor/predicates/predicates.c +4273 -0
  160. hydrocouple_meshkit-0.3.0/vendor/predicates/predicates.h +27 -0
  161. hydrocouple_meshkit-0.0.0.dev0/PKG-INFO +0 -19
  162. hydrocouple_meshkit-0.0.0.dev0/README.md +0 -8
  163. hydrocouple_meshkit-0.0.0.dev0/hydrocouple.meshkit.egg-info/PKG-INFO +0 -19
  164. hydrocouple_meshkit-0.0.0.dev0/hydrocouple.meshkit.egg-info/SOURCES.txt +0 -7
  165. hydrocouple_meshkit-0.0.0.dev0/meshkit/__init__.py +0 -4
  166. hydrocouple_meshkit-0.0.0.dev0/pyproject.toml +0 -19
  167. {hydrocouple_meshkit-0.0.0.dev0 → hydrocouple_meshkit-0.3.0/python}/hydrocouple.meshkit.egg-info/dependency_links.txt +0 -0
  168. {hydrocouple_meshkit-0.0.0.dev0 → hydrocouple_meshkit-0.3.0/python}/hydrocouple.meshkit.egg-info/top_level.txt +0 -0
  169. {hydrocouple_meshkit-0.0.0.dev0 → hydrocouple_meshkit-0.3.0}/setup.cfg +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.
@@ -0,0 +1,140 @@
1
+ cmake_minimum_required(VERSION 3.21)
2
+ project(MeshKit VERSION 0.3.0 LANGUAGES C CXX)
3
+
4
+ # The standard C++ event API is independent of the optional transitional Qt targets.
5
+ include(GNUInstallDirs)
6
+ include(CMakePackageConfigHelpers)
7
+ add_library(meshkit_runtime INTERFACE)
8
+ add_library(meshkit::runtime ALIAS meshkit_runtime)
9
+ set_target_properties(meshkit_runtime PROPERTIES EXPORT_NAME runtime)
10
+ target_compile_features(meshkit_runtime INTERFACE cxx_std_17)
11
+ target_include_directories(meshkit_runtime INTERFACE
12
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
13
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
14
+ find_package(Threads REQUIRED)
15
+ target_link_libraries(meshkit_runtime INTERFACE Threads::Threads)
16
+
17
+ include(cmake/CoreTargets.cmake)
18
+ option(MESHKIT_BUILD_CLI "Build the standard C++ mesh command-line tool" ${PROJECT_IS_TOP_LEVEL})
19
+ if(MESHKIT_BUILD_CLI)
20
+ add_executable(meshkit_cli tools/meshkit.cpp)
21
+ set_target_properties(meshkit_cli PROPERTIES OUTPUT_NAME meshkit AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
22
+ target_link_libraries(meshkit_cli PRIVATE meshkit::io)
23
+ install(TARGETS meshkit_cli RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
24
+ endif()
25
+
26
+ option(MESHKIT_BUILD_PYTHON "Build optional Python bindings without Qt or NumPy headers" OFF)
27
+ if(MESHKIT_BUILD_PYTHON)
28
+ include(cmake/PythonTargets.cmake)
29
+ endif()
30
+
31
+ option(MESHKIT_BUILD_QT "Build the extracted mesher and codecs with their current Qt API" ON)
32
+ if(MESHKIT_BUILD_QT)
33
+ include(cmake/QtTargets.cmake)
34
+ endif()
35
+
36
+ option(MESHKIT_BUILD_BENCHMARKS "Build opt-in standalone capacity probes" OFF)
37
+ if(MESHKIT_BUILD_BENCHMARKS)
38
+ add_executable(meshkit_native_scale_probe tests/native_scale_probe.cpp)
39
+ set_target_properties(meshkit_native_scale_probe PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
40
+ target_link_libraries(meshkit_native_scale_probe PRIVATE meshkit::io)
41
+ endif()
42
+ if(MESHKIT_BUILD_BENCHMARKS AND MESHKIT_BUILD_QT)
43
+ add_executable(meshkit_scale_probe tests/scale_probe.cpp)
44
+ set_target_properties(meshkit_scale_probe PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
45
+ target_link_libraries(meshkit_scale_probe PRIVATE meshkit::core_qt)
46
+ add_executable(meshkit_inp_read_probe tests/inp_read_probe.cpp)
47
+ set_target_properties(meshkit_inp_read_probe PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
48
+ target_link_libraries(meshkit_inp_read_probe PRIVATE meshkit::io_qt)
49
+ endif()
50
+
51
+ install(TARGETS meshkit_runtime EXPORT MeshKitTargets)
52
+ install(DIRECTORY include/meshkit DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
53
+ if(MESHKIT_BUILD_QT)
54
+ install(DIRECTORY include/mesh include/core DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
55
+ endif()
56
+ install(FILES LICENSE NOTICE RELICENSING.md DESTINATION ${CMAKE_INSTALL_DATADIR}/licenses/MeshKit)
57
+ install(EXPORT MeshKitTargets NAMESPACE meshkit:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MeshKit)
58
+ configure_package_config_file(cmake/MeshKitConfig.cmake.in
59
+ ${CMAKE_CURRENT_BINARY_DIR}/MeshKitConfig.cmake
60
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MeshKit)
61
+ write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/MeshKitConfigVersion.cmake
62
+ VERSION ${PROJECT_VERSION} COMPATIBILITY SameMajorVersion)
63
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/MeshKitConfig.cmake
64
+ ${CMAKE_CURRENT_BINARY_DIR}/MeshKitConfigVersion.cmake
65
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/MeshKit)
66
+
67
+ option(MESHKIT_BUILD_TESTS "Build standalone MeshKit tests" ${PROJECT_IS_TOP_LEVEL})
68
+ if(MESHKIT_BUILD_TESTS)
69
+ enable_testing()
70
+ add_executable(meshkit_runtime_test tests/runtime_test.cpp)
71
+ set_target_properties(meshkit_runtime_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
72
+ target_link_libraries(meshkit_runtime_test PRIVATE meshkit::runtime)
73
+ add_test(NAME meshkit_runtime_test COMMAND meshkit_runtime_test)
74
+ add_executable(meshkit_native_core_test tests/native_core_test.cpp)
75
+ set_target_properties(meshkit_native_core_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
76
+ target_link_libraries(meshkit_native_core_test PRIVATE meshkit::core)
77
+ add_test(NAME meshkit_native_core_test COMMAND meshkit_native_core_test)
78
+ add_executable(meshkit_native_mixed_test tests/native_mixed_test.cpp)
79
+ set_target_properties(meshkit_native_mixed_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
80
+ target_link_libraries(meshkit_native_mixed_test PRIVATE meshkit::core)
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)
94
+ add_executable(meshkit_raster_test tests/raster_test.cpp)
95
+ set_target_properties(meshkit_raster_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
96
+ target_link_libraries(meshkit_raster_test PRIVATE meshkit::core)
97
+ add_test(NAME meshkit_raster_test COMMAND meshkit_raster_test)
98
+ if(MESHKIT_BUILD_PYTHON)
99
+ add_test(NAME meshkit_python_test COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/python_test.py)
100
+ set_tests_properties(meshkit_python_test PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/python")
101
+ endif()
102
+ add_executable(meshkit_native_io_test tests/native_io_test.cpp)
103
+ set_target_properties(meshkit_native_io_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
104
+ target_link_libraries(meshkit_native_io_test PRIVATE meshkit::io)
105
+ add_test(NAME meshkit_native_io_test COMMAND meshkit_native_io_test)
106
+ if(MESHKIT_BUILD_QT)
107
+ find_package(Qt6 6.5 REQUIRED COMPONENTS Test)
108
+ add_executable(meshkit_kernel_parity_test tests/kernel_parity_test.cpp)
109
+ set_target_properties(meshkit_kernel_parity_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
110
+ target_link_libraries(meshkit_kernel_parity_test PRIVATE meshkit::core_qt meshkit::core)
111
+ add_test(NAME meshkit_kernel_parity_test COMMAND meshkit_kernel_parity_test)
112
+ add_executable(meshkit_constraints_test tests/constraints_test.cpp)
113
+ set_target_properties(meshkit_constraints_test PROPERTIES AUTOMOC ON AUTOUIC OFF AUTORCC OFF)
114
+ target_link_libraries(meshkit_constraints_test PRIVATE meshkit::core_qt Qt6::Test)
115
+ add_test(NAME meshkit_constraints_test COMMAND meshkit_constraints_test)
116
+ add_executable(meshkit_sizing_test tests/sizing_test.cpp)
117
+ set_target_properties(meshkit_sizing_test PROPERTIES AUTOMOC ON AUTOUIC OFF AUTORCC OFF)
118
+ target_link_libraries(meshkit_sizing_test PRIVATE meshkit::core_qt Qt6::Test)
119
+ add_test(NAME meshkit_sizing_test COMMAND meshkit_sizing_test)
120
+ add_executable(meshkit_cellplanner_test tests/cellplanner_test.cpp)
121
+ set_target_properties(meshkit_cellplanner_test PROPERTIES AUTOMOC ON AUTOUIC OFF AUTORCC OFF)
122
+ target_link_libraries(meshkit_cellplanner_test PRIVATE meshkit::core_qt Qt6::Test)
123
+ add_test(NAME meshkit_cellplanner_test COMMAND meshkit_cellplanner_test)
124
+ add_executable(meshkit_thinning_test tests/thinning_test.cpp)
125
+ set_target_properties(meshkit_thinning_test PROPERTIES AUTOMOC ON AUTOUIC OFF AUTORCC OFF)
126
+ target_link_libraries(meshkit_thinning_test PRIVATE meshkit::core_qt Qt6::Test)
127
+ add_test(NAME meshkit_thinning_test COMMAND meshkit_thinning_test)
128
+ foreach(suite meshcdt meshgenerator_v2)
129
+ add_executable(meshkit_${suite}_test tests/test_${suite}.cpp)
130
+ set_target_properties(meshkit_${suite}_test PROPERTIES AUTOMOC ON AUTOUIC OFF AUTORCC OFF)
131
+ target_link_libraries(meshkit_${suite}_test PRIVATE meshkit::core_qt Qt6::Test)
132
+ add_test(NAME meshkit_${suite}_test COMMAND meshkit_${suite}_test)
133
+ set_tests_properties(meshkit_${suite}_test PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
134
+ endforeach()
135
+ add_executable(meshkit_mesher_io_test tests/mesher_io_test.cpp)
136
+ set_target_properties(meshkit_mesher_io_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
137
+ target_link_libraries(meshkit_mesher_io_test PRIVATE meshkit::core_qt meshkit::io_qt)
138
+ add_test(NAME meshkit_mesher_io_test COMMAND meshkit_mesher_io_test)
139
+ endif()
140
+ endif()
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,8 @@
1
+ include CMakeLists.txt LICENSE NOTICE RELICENSING.md README.md NATIVE_API.md PROVENANCE.md VALIDATION.md CHANGELOG.md
2
+ recursive-include cmake *.cmake *.in
3
+ recursive-include include *.h *.hpp
4
+ recursive-include src *.cpp *.hpp
5
+ recursive-include vendor *.c *.h LICENSE
6
+ recursive-include tests *.cpp *.py
7
+ recursive-include tools *.cpp
8
+ recursive-include python *.py *.md