### P4-01 插件 ABI 1.4 mesher 扩展点 - VDE_PLUGIN_ABI_MINOR 3→4;VdePluginKind MESHER=8;VdeMesherStatus/Options/Result/Plugin; VdePluginRegistration 尾追加 mesher 指针(48→56B,旧 1.3 按 struct_size 安全); - PluginManager kind/meshers()/invoke_mesher()/失败隔离/unload 清理;ABI 语义 manifest.minor<=query.minor<=host.minor; - sample_mesher(mock tet4);ABI 矩阵 1.0–1.4 accepted=5 + 2.0 rejected;--abi/--check 适配; - test_plugin_mesher 7 用例 + VDE_PluginToolMesherAbi CTest;docs plugin-development §15/plugin-distribution §12; ### P4-02 Python ctypes 回归 - 可选 CTest VDE_PythonCtypesSmoke(Python3 可选/vde_capi_shared/smoke_test_ctypes.py;无 Python 跳过); - VDE_BUILD_PYTHON=ON MinGW 原生 pybind 明确跳过(ctypes 保留);README/testing 文档更新(C API 61/绑定 60); ### P4-03 模块包 CI 矩阵 - cmake/check_module_packages.cmake:configure/build/install → 10 模块包 find_package + 仓库内 consumer 编译运行; - tests/module_packages/consumers/(10 个最小工程);CI module-packages job;本地 MODULE_PACKAGES_PASS pass=10 fail=0; ### P4-04 宿主复测/平台 CI 交接 + 多团队分发体系 - docs/reference/76-宿主复测与平台CI交接包(1.0.78).md;VDE-1251/1252 反馈单追加复测指引; - docs/design/multi-team-development.md(T1–T8/ownership/契约/流程)、docs/planning/work-packages.md(39 WP)、 docs/guides/team-onboarding.md、docs/design/plugin-ecosystem-handoff.md、.github/ISSUE_TEMPLATE/work-package.yml; - roadmap P4-01..05 交付;WP 状态 27 Delivered/0 In-Progress/12 Candidate; ### 工程 - 版本 1.0.79;与远端 f6e0ac97(plugin template SDK consumption/ecosystem plan)rebase 集成; - 全量构建 0 error(405 targets);全量 ctest 7569 注册、7474/7474 PASS(0 failed,25 skipped,238.13s)。
1.5 KiB
1.5 KiB
sample_mesher(P4 / ABI 1.4 示例)
最小 Mesher 扩展点示例插件:纯 C ABI、不链接 VDE 内核,默认不加入插件聚合构建。
构建
cmake -S plugins/sample_mesher -B build/sample_mesher -G Ninja `
-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=<g++> -DPROJECT_SOURCE_DIR=<repo>
cmake --build build/sample_mesher
或作为其它工程子目录:
add_subdirectory(plugins/sample_mesher)
产物:<build>/plugins/sample_mesher/vde_sample_mesher.dll + vde-plugin.json
(manifest:id=com.vde.sample.mesher、kind=mesher、abi=1.4、capability=mesher:tet)。
接口
实现 VdeMesherPlugin:
mesher_id = "mesher.mock.tet4";mesh(host, model_data, model_size, options, result):本 mock 忽略真实几何, 输出固定单位立方体 tet4 网格(8 节点 / 5 四面体)JSON,并回显model_bytes/element_size/tolerance;result.mesh_json由host->alloc分配;vde_plugin_query/vde_plugin_init导出,注册VdePluginRegistration.mesher。
调用(宿主)
pm.load("com.vde.sample.mesher");
std::string mesh_json;
pm.invoke_mesher("mesher.mock.tet4", model_data, model_size,
"{\"element_size\":2.0}", &mesh_json);
限制
mock 实现(固定模板,不读取模型),仅用于 ABI/契约/调用路径验证;
生产 mesher 应使用 host->body_from_serialized + host->body_* 查询几何并实现真实网格算法。