hydrocouple.meshkit 0.0.0.dev0__tar.gz → 0.2.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.
- hydrocouple_meshkit-0.2.0/CHANGELOG.md +52 -0
- hydrocouple_meshkit-0.2.0/CMakeLists.txt +128 -0
- hydrocouple_meshkit-0.2.0/LICENSE +202 -0
- hydrocouple_meshkit-0.2.0/MANIFEST.in +8 -0
- hydrocouple_meshkit-0.2.0/NATIVE_API.md +176 -0
- hydrocouple_meshkit-0.2.0/NOTICE +12 -0
- hydrocouple_meshkit-0.2.0/PKG-INFO +89 -0
- hydrocouple_meshkit-0.2.0/PROVENANCE.md +74 -0
- hydrocouple_meshkit-0.2.0/README.md +252 -0
- hydrocouple_meshkit-0.2.0/RELICENSING.md +19 -0
- hydrocouple_meshkit-0.2.0/VALIDATION.md +212 -0
- hydrocouple_meshkit-0.2.0/cmake/CoreTargets.cmake +44 -0
- hydrocouple_meshkit-0.2.0/cmake/MeshKitConfig.cmake.in +23 -0
- hydrocouple_meshkit-0.2.0/cmake/PythonTargets.cmake +10 -0
- hydrocouple_meshkit-0.2.0/cmake/QtTargets.cmake +57 -0
- hydrocouple_meshkit-0.2.0/include/core/editgeometry.h +260 -0
- hydrocouple_meshkit-0.2.0/include/mesh/breaklinestrips.h +97 -0
- hydrocouple_meshkit-0.2.0/include/mesh/cellplanner.h +80 -0
- hydrocouple_meshkit-0.2.0/include/mesh/coarseningqueue.h +6 -0
- hydrocouple_meshkit-0.2.0/include/mesh/constraintaudit.h +41 -0
- hydrocouple_meshkit-0.2.0/include/mesh/constraintpreview.h +29 -0
- hydrocouple_meshkit-0.2.0/include/mesh/constraintsimplifier.h +86 -0
- hydrocouple_meshkit-0.2.0/include/mesh/inpmeshreader.h +134 -0
- hydrocouple_meshkit-0.2.0/include/mesh/inpmeshwriter.h +640 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshbctype.h +104 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshcdt.h +10 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshcellgeom.h +424 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshcellparams.h +145 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshcellstats.h +266 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshedgebc.h +70 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshedgekey.h +41 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshgenerator.h +583 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshinfil.h +472 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshpatch.h +156 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshprogress.h +6 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshquadcleanup.h +120 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshquadmatch.h +150 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshquadquality.h +315 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshquadregion.h +294 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshreorder.h +73 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshresolution.h +246 -0
- hydrocouple_meshkit-0.2.0/include/mesh/meshresult.h +257 -0
- hydrocouple_meshkit-0.2.0/include/mesh/naturalnbinterpolator.h +267 -0
- hydrocouple_meshkit-0.2.0/include/mesh/pslgprep.h +508 -0
- hydrocouple_meshkit-0.2.0/include/mesh/qtcdtstorage.h +19 -0
- hydrocouple_meshkit-0.2.0/include/mesh/qtnative.h +843 -0
- hydrocouple_meshkit-0.2.0/include/mesh/quadblocks.h +121 -0
- hydrocouple_meshkit-0.2.0/include/mesh/sizefield.h +252 -0
- hydrocouple_meshkit-0.2.0/include/mesh/sizingaudit.h +54 -0
- hydrocouple_meshkit-0.2.0/include/mesh/sms2dmreader.h +84 -0
- hydrocouple_meshkit-0.2.0/include/mesh/terrainpolicy.h +9 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/blocks.hpp +118 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/cdt.hpp +769 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/coarseningqueue.hpp +106 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/constraintaudit.hpp +42 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/constraints.hpp +84 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/detail/planmodel.hpp +170 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/detail/storage.hpp +208 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/events.hpp +167 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/geometry.hpp +116 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/io.hpp +39 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/job.hpp +95 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/mesh.hpp +81 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/patch.hpp +150 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/planning.hpp +81 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/progress.hpp +16 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/quadquality.hpp +312 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/raster.hpp +34 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/regions.hpp +288 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/sizefield.hpp +334 -0
- hydrocouple_meshkit-0.2.0/include/meshkit/terrainpolicy.hpp +59 -0
- hydrocouple_meshkit-0.2.0/pyproject.toml +19 -0
- hydrocouple_meshkit-0.2.0/python/README.md +63 -0
- hydrocouple_meshkit-0.2.0/python/hydrocouple.meshkit.egg-info/PKG-INFO +89 -0
- hydrocouple_meshkit-0.2.0/python/hydrocouple.meshkit.egg-info/SOURCES.txt +150 -0
- hydrocouple_meshkit-0.2.0/python/hydrocouple.meshkit.egg-info/not-zip-safe +1 -0
- hydrocouple_meshkit-0.2.0/python/hydrocouple.meshkit.egg-info/requires.txt +3 -0
- hydrocouple_meshkit-0.2.0/python/meshkit/__init__.py +38 -0
- hydrocouple_meshkit-0.2.0/setup.py +45 -0
- hydrocouple_meshkit-0.2.0/src/core/editgeometry.cpp +450 -0
- hydrocouple_meshkit-0.2.0/src/mesh/breaklinestrips.cpp +413 -0
- hydrocouple_meshkit-0.2.0/src/mesh/cellplanner.cpp +9 -0
- hydrocouple_meshkit-0.2.0/src/mesh/constraintaudit.cpp +8 -0
- hydrocouple_meshkit-0.2.0/src/mesh/constraintpreview.cpp +88 -0
- hydrocouple_meshkit-0.2.0/src/mesh/constraintshared.cpp +7 -0
- hydrocouple_meshkit-0.2.0/src/mesh/constraintsimplifier.cpp +10 -0
- hydrocouple_meshkit-0.2.0/src/mesh/inpmeshreader.cpp +1637 -0
- hydrocouple_meshkit-0.2.0/src/mesh/inpmeshwriter.cpp +1659 -0
- hydrocouple_meshkit-0.2.0/src/mesh/meshbctype.cpp +107 -0
- hydrocouple_meshkit-0.2.0/src/mesh/meshcdt.cpp +5 -0
- hydrocouple_meshkit-0.2.0/src/mesh/meshcellparams.cpp +423 -0
- hydrocouple_meshkit-0.2.0/src/mesh/meshcellstats.cpp +491 -0
- hydrocouple_meshkit-0.2.0/src/mesh/meshgenerator.cpp +3816 -0
- hydrocouple_meshkit-0.2.0/src/mesh/meshinfil.cpp +670 -0
- hydrocouple_meshkit-0.2.0/src/mesh/meshpatch.cpp +17 -0
- hydrocouple_meshkit-0.2.0/src/mesh/meshquadcleanup.cpp +736 -0
- hydrocouple_meshkit-0.2.0/src/mesh/meshquadmatch.cpp +530 -0
- hydrocouple_meshkit-0.2.0/src/mesh/meshquadregion.cpp +17 -0
- hydrocouple_meshkit-0.2.0/src/mesh/meshreorder.cpp +170 -0
- hydrocouple_meshkit-0.2.0/src/mesh/naturalnbinterpolator.cpp +493 -0
- hydrocouple_meshkit-0.2.0/src/mesh/pslgprep.cpp +917 -0
- hydrocouple_meshkit-0.2.0/src/mesh/quadblocks.cpp +9 -0
- hydrocouple_meshkit-0.2.0/src/mesh/sizefield.cpp +12 -0
- hydrocouple_meshkit-0.2.0/src/mesh/sizingaudit.cpp +212 -0
- hydrocouple_meshkit-0.2.0/src/mesh/sms2dmreader.cpp +256 -0
- hydrocouple_meshkit-0.2.0/src/native/binaryio.cpp +265 -0
- hydrocouple_meshkit-0.2.0/src/native/blocks.cpp +335 -0
- hydrocouple_meshkit-0.2.0/src/native/cdt.cpp +2 -0
- hydrocouple_meshkit-0.2.0/src/native/cdt_impl.hpp +2540 -0
- hydrocouple_meshkit-0.2.0/src/native/constraintaudit.cpp +823 -0
- hydrocouple_meshkit-0.2.0/src/native/constraints.cpp +570 -0
- hydrocouple_meshkit-0.2.0/src/native/constraintshared.cpp +409 -0
- hydrocouple_meshkit-0.2.0/src/native/file.hpp +313 -0
- hydrocouple_meshkit-0.2.0/src/native/job.cpp +1211 -0
- hydrocouple_meshkit-0.2.0/src/native/mesh.cpp +152 -0
- hydrocouple_meshkit-0.2.0/src/native/mixed.hpp +212 -0
- hydrocouple_meshkit-0.2.0/src/native/operation.hpp +125 -0
- hydrocouple_meshkit-0.2.0/src/native/patch.cpp +1548 -0
- hydrocouple_meshkit-0.2.0/src/native/planning.cpp +933 -0
- hydrocouple_meshkit-0.2.0/src/native/python.cpp +1376 -0
- hydrocouple_meshkit-0.2.0/src/native/raster.cpp +181 -0
- hydrocouple_meshkit-0.2.0/src/native/regionlimits.hpp +81 -0
- hydrocouple_meshkit-0.2.0/src/native/regions.cpp +558 -0
- hydrocouple_meshkit-0.2.0/src/native/sizefield.cpp +521 -0
- hydrocouple_meshkit-0.2.0/src/native/smsio.cpp +490 -0
- hydrocouple_meshkit-0.2.0/src/native/sourcechains.hpp +135 -0
- hydrocouple_meshkit-0.2.0/tests/cellplanner_test.cpp +324 -0
- hydrocouple_meshkit-0.2.0/tests/constraints_test.cpp +469 -0
- hydrocouple_meshkit-0.2.0/tests/inp_read_probe.cpp +230 -0
- hydrocouple_meshkit-0.2.0/tests/kernel_parity_test.cpp +20 -0
- hydrocouple_meshkit-0.2.0/tests/make_inp_mesh_fixture.py +131 -0
- hydrocouple_meshkit-0.2.0/tests/mesher_io_test.cpp +76 -0
- hydrocouple_meshkit-0.2.0/tests/mixed_scale_probe.py +50 -0
- hydrocouple_meshkit-0.2.0/tests/native_core_test.cpp +43 -0
- hydrocouple_meshkit-0.2.0/tests/native_io_test.cpp +212 -0
- hydrocouple_meshkit-0.2.0/tests/native_mixed_test.cpp +180 -0
- hydrocouple_meshkit-0.2.0/tests/native_scale_probe.cpp +42 -0
- hydrocouple_meshkit-0.2.0/tests/python_test.py +136 -0
- hydrocouple_meshkit-0.2.0/tests/raster_test.cpp +11 -0
- hydrocouple_meshkit-0.2.0/tests/runtime_test.cpp +62 -0
- hydrocouple_meshkit-0.2.0/tests/scale_probe.cpp +163 -0
- hydrocouple_meshkit-0.2.0/tests/sizing_test.cpp +230 -0
- hydrocouple_meshkit-0.2.0/tests/test_meshcdt.cpp +1137 -0
- hydrocouple_meshkit-0.2.0/tests/test_meshgenerator_v2.cpp +1247 -0
- hydrocouple_meshkit-0.2.0/tests/thinning_test.cpp +313 -0
- hydrocouple_meshkit-0.2.0/tools/meshkit.cpp +27 -0
- hydrocouple_meshkit-0.2.0/vendor/predicates/LICENSE +9 -0
- hydrocouple_meshkit-0.2.0/vendor/predicates/predicates.c +4273 -0
- hydrocouple_meshkit-0.2.0/vendor/predicates/predicates.h +27 -0
- hydrocouple_meshkit-0.0.0.dev0/PKG-INFO +0 -19
- hydrocouple_meshkit-0.0.0.dev0/README.md +0 -8
- hydrocouple_meshkit-0.0.0.dev0/hydrocouple.meshkit.egg-info/PKG-INFO +0 -19
- hydrocouple_meshkit-0.0.0.dev0/hydrocouple.meshkit.egg-info/SOURCES.txt +0 -7
- hydrocouple_meshkit-0.0.0.dev0/meshkit/__init__.py +0 -4
- hydrocouple_meshkit-0.0.0.dev0/pyproject.toml +0 -19
- {hydrocouple_meshkit-0.0.0.dev0 → hydrocouple_meshkit-0.2.0/python}/hydrocouple.meshkit.egg-info/dependency_links.txt +0 -0
- {hydrocouple_meshkit-0.0.0.dev0 → hydrocouple_meshkit-0.2.0/python}/hydrocouple.meshkit.egg-info/top_level.txt +0 -0
- {hydrocouple_meshkit-0.0.0.dev0 → hydrocouple_meshkit-0.2.0}/setup.cfg +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.2.0 — first standalone release
|
|
6
|
+
|
|
7
|
+
MeshKit moves out of the OpenSWMM GUI repository (`libraries/meshkit`) into its
|
|
8
|
+
own repository, with its history. Apart from the addition and fixes below, the
|
|
9
|
+
library is unchanged from the GUI's 2026-11-12 copy; what is new is the
|
|
10
|
+
repository around it.
|
|
11
|
+
|
|
12
|
+
Added:
|
|
13
|
+
|
|
14
|
+
- Initial cell velocity: `MeshTriangle::initU` and `initV` (m/s whatever the
|
|
15
|
+
project units; 0, 0 = at rest), read from and written to the
|
|
16
|
+
`[2D_INITIAL_VELOCITY]` section, offered as the `initU`/`initV` cell
|
|
17
|
+
parameters and kept through quad pairing. An external mesh file's section
|
|
18
|
+
wins over the `.inp`'s. Ported from the GUI's copy (2026-11-13).
|
|
19
|
+
|
|
20
|
+
Fixed:
|
|
21
|
+
|
|
22
|
+
- The robust predicates are compiled without floating-point contraction
|
|
23
|
+
(`-ffp-contract=off`). GCC fuses multiply-adds by default wherever the CPU has
|
|
24
|
+
FMA, which every arm64 CPU does; a fused multiply-add skips a rounding the
|
|
25
|
+
exact `orient2d`/`incircle` arithmetic depends on. On Linux arm64 that made
|
|
26
|
+
constraint insertion and point location fail (`meshkit_meshcdt_test`,
|
|
27
|
+
`meshkit_meshgenerator_v2_test`); Apple Clang can fuse within an expression.
|
|
28
|
+
- macOS wheels for x86_64, which cibuildwheel cross-builds on arm64 runners,
|
|
29
|
+
now contain x86_64 code: `setup.py` passes the architecture named in
|
|
30
|
+
`ARCHFLAGS` to CMake, and always sets one, so a reused build tree cannot keep
|
|
31
|
+
another.
|
|
32
|
+
|
|
33
|
+
Repository:
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
- Builds, tests and installs on its own (`cmake -S .`); consumers use
|
|
37
|
+
`find_package(MeshKit)` or fetch a tagged release with `FetchContent`.
|
|
38
|
+
- Continuous integration: the Qt-free targets on Linux, macOS and Windows, and
|
|
39
|
+
the Qt targets on Linux. macOS jobs run on `macos-latest` (GitHub retired the
|
|
40
|
+
`macos-14` runners).
|
|
41
|
+
- Release wheels: on a `v*` tag, cibuildwheel builds the Python package for
|
|
42
|
+
CPython 3.10–3.13 on Linux, macOS and Windows and publishes it, with an sdist,
|
|
43
|
+
to PyPI as `hydrocouple.meshkit` (`pip install hydrocouple.meshkit`, then
|
|
44
|
+
`import meshkit`; PyPI refuses the name `meshkit` as too close to the
|
|
45
|
+
unrelated `mesh-kit`). The release refuses a tag that does not match the
|
|
46
|
+
version in `CMakeLists.txt` and `setup.py`.
|
|
47
|
+
- Apache-2.0 (rights-holder authorization recorded in RELICENSING.md); the
|
|
48
|
+
vendored robust predicates keep their public-domain notice.
|
|
49
|
+
- Project governance shared with the other HydroCouple repositories:
|
|
50
|
+
contribution guide, individual and corporate CLAs, Code of Conduct, security
|
|
51
|
+
policy, privacy statement, authors, citation metadata (CITATION.cff,
|
|
52
|
+
.zenodo.json), issue templates, and CodeQL and OpenSSF Scorecard workflows.
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.21)
|
|
2
|
+
project(MeshKit VERSION 0.2.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_raster_test tests/raster_test.cpp)
|
|
83
|
+
set_target_properties(meshkit_raster_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
|
|
84
|
+
target_link_libraries(meshkit_raster_test PRIVATE meshkit::core)
|
|
85
|
+
add_test(NAME meshkit_raster_test COMMAND meshkit_raster_test)
|
|
86
|
+
if(MESHKIT_BUILD_PYTHON)
|
|
87
|
+
add_test(NAME meshkit_python_test COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/tests/python_test.py)
|
|
88
|
+
set_tests_properties(meshkit_python_test PROPERTIES ENVIRONMENT "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR}/python")
|
|
89
|
+
endif()
|
|
90
|
+
add_executable(meshkit_native_io_test tests/native_io_test.cpp)
|
|
91
|
+
set_target_properties(meshkit_native_io_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
|
|
92
|
+
target_link_libraries(meshkit_native_io_test PRIVATE meshkit::io)
|
|
93
|
+
add_test(NAME meshkit_native_io_test COMMAND meshkit_native_io_test)
|
|
94
|
+
if(MESHKIT_BUILD_QT)
|
|
95
|
+
find_package(Qt6 6.5 REQUIRED COMPONENTS Test)
|
|
96
|
+
add_executable(meshkit_kernel_parity_test tests/kernel_parity_test.cpp)
|
|
97
|
+
set_target_properties(meshkit_kernel_parity_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
|
|
98
|
+
target_link_libraries(meshkit_kernel_parity_test PRIVATE meshkit::core_qt meshkit::core)
|
|
99
|
+
add_test(NAME meshkit_kernel_parity_test COMMAND meshkit_kernel_parity_test)
|
|
100
|
+
add_executable(meshkit_constraints_test tests/constraints_test.cpp)
|
|
101
|
+
set_target_properties(meshkit_constraints_test PROPERTIES AUTOMOC ON AUTOUIC OFF AUTORCC OFF)
|
|
102
|
+
target_link_libraries(meshkit_constraints_test PRIVATE meshkit::core_qt Qt6::Test)
|
|
103
|
+
add_test(NAME meshkit_constraints_test COMMAND meshkit_constraints_test)
|
|
104
|
+
add_executable(meshkit_sizing_test tests/sizing_test.cpp)
|
|
105
|
+
set_target_properties(meshkit_sizing_test PROPERTIES AUTOMOC ON AUTOUIC OFF AUTORCC OFF)
|
|
106
|
+
target_link_libraries(meshkit_sizing_test PRIVATE meshkit::core_qt Qt6::Test)
|
|
107
|
+
add_test(NAME meshkit_sizing_test COMMAND meshkit_sizing_test)
|
|
108
|
+
add_executable(meshkit_cellplanner_test tests/cellplanner_test.cpp)
|
|
109
|
+
set_target_properties(meshkit_cellplanner_test PROPERTIES AUTOMOC ON AUTOUIC OFF AUTORCC OFF)
|
|
110
|
+
target_link_libraries(meshkit_cellplanner_test PRIVATE meshkit::core_qt Qt6::Test)
|
|
111
|
+
add_test(NAME meshkit_cellplanner_test COMMAND meshkit_cellplanner_test)
|
|
112
|
+
add_executable(meshkit_thinning_test tests/thinning_test.cpp)
|
|
113
|
+
set_target_properties(meshkit_thinning_test PROPERTIES AUTOMOC ON AUTOUIC OFF AUTORCC OFF)
|
|
114
|
+
target_link_libraries(meshkit_thinning_test PRIVATE meshkit::core_qt Qt6::Test)
|
|
115
|
+
add_test(NAME meshkit_thinning_test COMMAND meshkit_thinning_test)
|
|
116
|
+
foreach(suite meshcdt meshgenerator_v2)
|
|
117
|
+
add_executable(meshkit_${suite}_test tests/test_${suite}.cpp)
|
|
118
|
+
set_target_properties(meshkit_${suite}_test PROPERTIES AUTOMOC ON AUTOUIC OFF AUTORCC OFF)
|
|
119
|
+
target_link_libraries(meshkit_${suite}_test PRIVATE meshkit::core_qt Qt6::Test)
|
|
120
|
+
add_test(NAME meshkit_${suite}_test COMMAND meshkit_${suite}_test)
|
|
121
|
+
set_tests_properties(meshkit_${suite}_test PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
|
|
122
|
+
endforeach()
|
|
123
|
+
add_executable(meshkit_mesher_io_test tests/mesher_io_test.cpp)
|
|
124
|
+
set_target_properties(meshkit_mesher_io_test PROPERTIES AUTOMOC OFF AUTOUIC OFF AUTORCC OFF)
|
|
125
|
+
target_link_libraries(meshkit_mesher_io_test PRIVATE meshkit::core_qt meshkit::io_qt)
|
|
126
|
+
add_test(NAME meshkit_mesher_io_test COMMAND meshkit_mesher_io_test)
|
|
127
|
+
endif()
|
|
128
|
+
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
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# Native API — MeshKit 0.2, job report version 2
|
|
2
|
+
|
|
3
|
+
`meshkit::core` and `meshkit::io` require standard C++17, threads and the vendored
|
|
4
|
+
public-domain robust predicates. They contain no Qt, GUI, engine, GDAL or Python
|
|
5
|
+
dependency. Configure `MESHKIT_BUILD_QT=OFF` to build and install them alone.
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
cmake -S . -B build-meshkit-native \
|
|
9
|
+
-DMESHKIT_BUILD_QT=OFF -DMESHKIT_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
|
|
10
|
+
cmake --build build-meshkit-native
|
|
11
|
+
ctest --test-dir build-meshkit-native --output-on-failure
|
|
12
|
+
cmake --install build-meshkit-native --prefix /your/install/path
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```cmake
|
|
16
|
+
find_package(MeshKit 0.2 CONFIG REQUIRED COMPONENTS core io runtime)
|
|
17
|
+
target_link_libraries(my_program PRIVATE meshkit::core meshkit::io)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Request and result
|
|
21
|
+
|
|
22
|
+
Include `<meshkit/job.hpp>` and `<meshkit/io.hpp>`. `runJob(request, providers,
|
|
23
|
+
events)` is synchronous. It borrows immutable request data and callbacks for the
|
|
24
|
+
call and returns owned arrays and a versioned report. Independent calls can run
|
|
25
|
+
on independent threads. Callbacks run on the calling thread, must not reenter the
|
|
26
|
+
job, and must return promptly for cancellation to remain responsive.
|
|
27
|
+
|
|
28
|
+
`JobRequest::points` contains mandatory source points in a common Cartesian XY
|
|
29
|
+
frame. `Path` connectivity indexes these points, starting at zero. An explicit
|
|
30
|
+
outer domain is required. Outer domains form a union; holes are subtracted.
|
|
31
|
+
Region and line paths constrain edges. Non-line paths close implicitly; line
|
|
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
|
|
34
|
+
inside a hole fail rather than disappearing silently. Dense raw terrain samples
|
|
35
|
+
should be supplied through terrain providers, not declared as mandatory pins.
|
|
36
|
+
|
|
37
|
+
Exact XY duplicates, including signed zero, share a geometric vertex across
|
|
38
|
+
paths. The input-to-output map and `VertexAlias` preserve their source identifiers
|
|
39
|
+
and markers. Consecutive duplicates and closing duplicates do not create
|
|
40
|
+
zero-length edges. A ring that revisits a vertex away from closure fails.
|
|
41
|
+
Crossing lines must be noded before using the native job API; the transitional GUI
|
|
42
|
+
pipeline has its existing intersection preparation. Near coordinates remain
|
|
43
|
+
distinct; minimum target size never becomes a welding radius in this API.
|
|
44
|
+
|
|
45
|
+
`Metadata` declares metres per XY unit and metres per Z unit. Size/edge policies
|
|
46
|
+
and provider footprint bounds use XY units; elevation and error tolerance use Z
|
|
47
|
+
units. The facet-normal scale derives from the physical unit scales. No CRS
|
|
48
|
+
conversion occurs here. Unknown units fail a job; imported SMS 2DM units start
|
|
49
|
+
unknown. Metadata strings are UTF-8. Provider identity is caller-supplied evidence
|
|
50
|
+
of the dataset/version; it is not a library-generated content fingerprint.
|
|
51
|
+
|
|
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.
|
|
53
|
+
|
|
54
|
+
`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
|
+
|
|
56
|
+
`pointElevations` optionally supplies authored heights (NaN samples the provider). Coincident finite heights must agree. `RasterSurface` owns a regular node grid, supports missing data, and supplies native bilinear elevation/witness/bounds. Row index increases in +Y; spacing is positive. Its full triangle/raster intersection check includes extrema along clipped edges and a conservative numerical margin. NoData is unknown, not interpolated across gaps. Query work is bounded. It certifies the chosen bilinear reference, not the physical accuracy of the source DEM.
|
|
57
|
+
|
|
58
|
+
Apache-2.0 applies to this project under the recorded rights-holder authorization. See [RELICENSING.md](RELICENSING.md); predicates retain their separate notice. [Python API and build instructions](python/README.md) describe asynchronous jobs, buffer ownership, native raster input and codecs.
|
|
59
|
+
|
|
60
|
+
## Sizing, terrain and completion
|
|
61
|
+
|
|
62
|
+
`maximumSize(Box2)` returns a conservative upper size bound over the entire
|
|
63
|
+
footprint, including narrow sources. Zero means no provider limit; a global
|
|
64
|
+
positive maximum still applies. Negative/nonfinite bounds fail. The minimum
|
|
65
|
+
target is advisory because protected geometry can require smaller cells. An
|
|
66
|
+
independent minimum actual edge requirement is optional. Nominal triangle size
|
|
67
|
+
is the equilateral side of equal area; quad size is the square root of area. Region spacing remains a conservative footprint bound after triangle fallback. Concave/holed local region bounding boxes may conservatively over-refine. Transition ratio compares adjacent
|
|
68
|
+
nominal cell sizes. Repair has explicit pass/insertion limits.
|
|
69
|
+
|
|
70
|
+
Positive terrain tolerance requires elevation, residual witness and certified
|
|
71
|
+
bound providers. Unknown coverage rejects coarsening. The optional linear
|
|
72
|
+
size-weighted tolerance and resolution-aware coarsening order use the same
|
|
73
|
+
scalar policies as the GUI. Physical facet normals rank generated free vertices;
|
|
74
|
+
source points and constraints remain protected. Independent final checks report
|
|
75
|
+
terrain bounds, nominal sizes, edge lengths and adjacent ratios.
|
|
76
|
+
|
|
77
|
+
`Complete` and `CompleteWithExceptions` return a mesh; inspect the report to
|
|
78
|
+
understand advisory minimum-size or other accepted exceptions. Strict sizing
|
|
79
|
+
refuses unresolved maximum/edge/transition requirements. Requiring terrain
|
|
80
|
+
certification refuses unknown or unmet terrain bounds. `Infeasible`, `Cancelled`,
|
|
81
|
+
`ResourceLimit` and `Failed` return empty geometry and mappings. Examples are
|
|
82
|
+
bounded to 64 records, with separate total counters. Reports capture resolved
|
|
83
|
+
options and provider identity. Events use the existing bounded `EventChannel`.
|
|
84
|
+
|
|
85
|
+
Limits bound counts, estimated workspace and orchestration/audit work, not total
|
|
86
|
+
process RSS or arbitrary time inside caller providers. The kernel also has
|
|
87
|
+
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
|
|
89
|
+
partially accepted candidate when it reaches a cap. `validateMesh` checks finite
|
|
90
|
+
coordinates, IDs, local connectivity and positive convex cell geometry; it does
|
|
91
|
+
not certify arbitrary nonincident cell overlap or CRS correctness.
|
|
92
|
+
|
|
93
|
+
## Neutral data and file I/O
|
|
94
|
+
|
|
95
|
+
`Mesh` owns contiguous standard arrays: XYZ doubles, zero-based uint32 cell and
|
|
96
|
+
edge connectivity, paths, optional signed 64-bit external IDs, numeric markers,
|
|
97
|
+
region labels, source aliases and generic metadata. Empty ID arrays mean
|
|
98
|
+
sequential IDs starting at one. Empty vertex-marker arrays mean zero. The neutral
|
|
99
|
+
model excludes SWMM boundary, coupling, infiltration and project ownership data.
|
|
100
|
+
Those remain in application codecs/adapters and must not be discarded by
|
|
101
|
+
pretending a generic export preserves them. Python bindings are not implemented
|
|
102
|
+
in this increment; these owned arrays establish their native boundary.
|
|
103
|
+
|
|
104
|
+
Reads return no partial mesh on failure. Writes validate first, stream to an
|
|
105
|
+
exclusive temporary in the destination directory and publish atomically.
|
|
106
|
+
Existing files are protected by default. `overwrite=true` allows atomic
|
|
107
|
+
replacement. Cancellation/failure before publication preserves old contents.
|
|
108
|
+
`durable=true` synchronizes temporary file contents before publication; it does
|
|
109
|
+
not promise portable directory-entry durability across power loss. Filesystems
|
|
110
|
+
must support same-directory atomic publication (and POSIX hard links for the
|
|
111
|
+
no-replace case); unsupported operations return an error without a direct-write
|
|
112
|
+
fallback.
|
|
113
|
+
|
|
114
|
+
### MeshKit binary (`.mkb`)
|
|
115
|
+
|
|
116
|
+
Version 1 is lossless for the neutral model. Fields are little-endian; no host
|
|
117
|
+
struct layout or padding is serialized. Strings are counted UTF-8 bytes.
|
|
118
|
+
|
|
119
|
+
| Order | Fields |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| Header | 8 bytes `MESHKIT` followed by NUL; uint32 version=1; uint32 flags (bit 0: units known); six uint64 counts: vertices, cells, edges, paths, labels, aliases |
|
|
122
|
+
| Metadata | two float64 unit scales; CRS and description (each uint64 byte length followed by bytes) |
|
|
123
|
+
| Labels | int32 ID; counted name |
|
|
124
|
+
| Vertices | int64 external ID; float64 X/Y/Z; int32 marker |
|
|
125
|
+
| Cells | int64 external ID; uint8 corner count (3 or 4); int32 region; uint32 indexes for each corner |
|
|
126
|
+
| Edges | int64 external ID; uint32 endpoints; int32 marker |
|
|
127
|
+
| Paths | int64 ID; int32 marker; uint8 kind; uint8 closed flag; uint64 index count; uint32 indexes |
|
|
128
|
+
| Aliases | uint32 vertex; int64 source ID; int32 marker |
|
|
129
|
+
| Footer | uint64 FNV-1a checksum of all preceding bytes |
|
|
130
|
+
|
|
131
|
+
Reserved features, invalid counts/UTF-8/connectivity, truncation, checksum failure
|
|
132
|
+
and trailing bytes are rejected. The checksum detects accidental corruption; it
|
|
133
|
+
is not an authenticity signature. Count and workspace checks precede bulk
|
|
134
|
+
allocation. Nonseekable `std::istream` binary reads are supported.
|
|
135
|
+
|
|
136
|
+
### SMS 2DM (`.2dm`)
|
|
137
|
+
|
|
138
|
+
The two-pass seekable reader resolves elements that precede nodes without
|
|
139
|
+
loading the whole file as text. It supports `MESH2D`, `ND`, `E3T`, `E4Q` and
|
|
140
|
+
standard `NS` node strings. Negative final node ID terminates a node string;
|
|
141
|
+
consecutive NS records may continue it. See the
|
|
142
|
+
[Aquaveo SMS manual](https://smsdocs.aquaveo.com/SMS_User_Manual_v11.1.pdf).
|
|
143
|
+
Clockwise cells are reoriented and counted; degenerate/nonconvex cells fail.
|
|
144
|
+
Sparse positive node/element IDs are preserved. Duplicate IDs, missing references,
|
|
145
|
+
extra geometry fields, nonfinite coordinates, unterminated node strings and
|
|
146
|
+
oversized records fail. The two passes compare file content checksums to detect
|
|
147
|
+
changes during reading.
|
|
148
|
+
|
|
149
|
+
Unknown cards fail by default. `IgnoreWithReport` is an explicit compatibility
|
|
150
|
+
choice, returning `CompleteWithExceptions`, a total ignored count and bounded
|
|
151
|
+
codes. `legacy2dm` also accepts historical nonpositive IDs and optional/text
|
|
152
|
+
material labels for the GUI import adapter. The GUI file reader now streams
|
|
153
|
+
through this path; its existing whole-text `parse` helper retains legacy behavior.
|
|
154
|
+
Project import displays compatibility warnings. Node strings become tagged GUI
|
|
155
|
+
constraint edges. GUI indexing remaps external IDs as before.
|
|
156
|
+
|
|
157
|
+
2DM cannot preserve all neutral attributes. Export refuses by default if units,
|
|
158
|
+
CRS, description, labels, aliases, vertex/edge markers or path roles/IDs would be
|
|
159
|
+
lost. Explicit `allowAttributeLoss` returns the loss categories. MKB is the
|
|
160
|
+
lossless alternative. SWMM's `[2D_*]` sidecar grammar is separate and remains with
|
|
161
|
+
the application-aware `_qt` codec.
|
|
162
|
+
|
|
163
|
+
## Command-line smoke path
|
|
164
|
+
|
|
165
|
+
The optional `meshkit` executable requires no Qt:
|
|
166
|
+
|
|
167
|
+
```sh
|
|
168
|
+
meshkit box 0 0 100 100 5 rectangle.mkb
|
|
169
|
+
meshkit inspect rectangle.mkb
|
|
170
|
+
meshkit convert rectangle.mkb rectangle.2dm --allow-loss
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
`box` explicitly declares a flat rectangular domain, zero elevation and metre
|
|
174
|
+
units. `--overwrite` permits replacement. SIGINT/SIGTERM request cancellation.
|
|
175
|
+
No mesh bounds, units, terrain source or missing domain are silently inferred by
|
|
176
|
+
an import-to-job shortcut.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
MeshKit
|
|
2
|
+
Copyright (c) 2026 Caleb Buahin and the contributors identified in source files.
|
|
3
|
+
|
|
4
|
+
This distribution includes the independently extracted and modified meshing code
|
|
5
|
+
from OpenSWMM GUI. Its rights holder authorized Apache-2.0 licensing on
|
|
6
|
+
2026-10-29. Copyright notices in individual files are retained. Earlier GPL
|
|
7
|
+
releases retain their existing grants; the surrounding OpenSWMM GUI remains GPL.
|
|
8
|
+
|
|
9
|
+
Robust geometric predicates by Jonathan Richard Shewchuk are distributed under
|
|
10
|
+
their original public-domain notice in vendor/predicates/LICENSE. No Triangle
|
|
11
|
+
mesher is included. Python and optional Qt runtimes are separate dependencies
|
|
12
|
+
and retain their respective licenses; they are not relicensed by this notice.
|