### P1.x 内核对齐(P1 遗留收口)
- 原生 .vde 序列化(serializer/vde_format/vde_text)迁入内核 vde_brep;C API 序列化回迁 vde_kernel_capi;
PMI/MBD 拆为内核数据模型(vde_brep)+ 3D-PDF 导出(vde_io/pmi_export.cpp),消除 kernel→io 反向依赖;
- make_geometry_host_services() 迁入内核 vde_brep,kernel-only 下 PluginManager+宿主服务可用;
- kernel-only 约 40 个测试 target + 4 个 examples 门控;六业务 OFF 的 2 个测试 target 门控;
- vde_version() 返回 0.5.0 既有缺陷修复;kernel SDK consumer 实测 1.0.47;
### P2-1 vde_cae 官方模块
- include/vde/cae/*、src/cae/*、tests/cae/*;旧路径转发头兼容;VDE_BUILD_CAE 开关;
- vde_io 移除 fea_mesh/fluid_domain;ctest 用例数保持(95 项 CAE 测试);CAE=OFF 构建 937/937;
### P2-2 插件 ABI 1.2:CAE solver / CAM strategy 扩展点
- VdeCaeSolverPlugin/VdeCamStrategyPlugin + Registration 尾部扩展(旧插件兼容);
- PluginManager cae_solvers()/cam_strategies()/solve_cae()/invoke_cam(),加载校验/失败隔离;
- plugins/sample_cae、sample_cam_post、abi11_compat、external/{runner,sample_stl_converter};
- docs/design/vde-service-protocol.md 进程外服务协议草案;test_plugin_extensions 9/9;
### VDE-1249 三阻塞修复
- fix1 共享边采样性能悬崖:sagitta 自适应段数 + 自由曲面证据触发 + fast planar loop 256 + IncrementalMesher 复用 mesh_face_diag;
box+16 孔 legacy 3.3-3.6s→69.5ms、rebuild 4095→103ms;box+25 孔 5.1s→190.9ms;n42 链 ≤222ms;open=0/面积体积正确;
- fix2 fillet/blend 破损体护栏(fillet_edges_checked:watertight/dangling 护栏 + heal 重试 + 显式失败/诊断;
静默 no-op success → 显式失败)+ delete_face_with_heal/fill_hole 边环重排(26 面盒 0/26→6/6,box 2/6→6/6);
- fix3 wireframe tight payload:WireframeOptions.include_segment_info + C API VdeWireframeOptions 尾扩展 +
vde_body_to_wireframe_opt2(旧 ABI 安全);tight≈49-61% full(与 1.0.12 旧风格差 4B/段);
### 工程
- 修复 .gitignore `*.txt` 误伤:`!CMakeLists.txt`,把 plugins/**、tools/、tests/plugin、tests/cae 等漏入库的
CMakeLists.txt 纳入版本库(保证干净 checkout 可构建);
- 版本 1.0.47(CMake/version.h/test_version/README/docs index/module-manual 同步);
验证:全量构建 0 error(334 targets);全量 ctest 7395 注册、7300/7300 PASS(0 failed,24 skipped,194.39s);
kernel-only(-DVDE_BUILD_IO=OFF + BUILD_TESTS=ON)全量构建 0 failed、plugin 30/12 + capi_split 7 全绿;
六业务 OFF 全量测试构建 0 failed;CAE 95/95;插件 ctest 61/61;VDE-1249 repro 前后数字见 CHANGELOG。
40 lines
2.2 KiB
C++
40 lines
2.2 KiB
C++
#pragma once
|
||
/**
|
||
* @file geometry_host_services.h
|
||
* @brief 宿主侧几何服务表构建器(P1.x 起编译进内核 vde_brep;内核测试/应用/kernel-only 使用)
|
||
*
|
||
* 返回的 VdePluginHost 表指向本进程内的唯一内核实例(BrepModel/测量/三角化/序列化),
|
||
* 插件只通过该表访问几何,因此不存在"插件另带一份内核静态库"的句柄错配问题。
|
||
*
|
||
* 服务语义补充(P0-4):
|
||
* - 内存:\c alloc/\c realloc/\c free 对应 C 运行库 malloc/realloc/free;
|
||
* 句柄由 \c body_create_* 用 operator new 创建,只能由 \c body_destroy 销毁;
|
||
* - 诊断:\c set_error 写入**线程本地**错误串(宿主侧可用
|
||
* \c geometry_host_last_error() 读取,便于测试/宿主判断失败原因);
|
||
* - \c body_tessellate:\c deflection 为相对包围盒对角线的比例(≤0 时取 0.01);
|
||
* 输出的 \c normals 为**每顶点法向**(长度 3×num_vertices,与 positions 对齐;
|
||
* 无三角形时为 null);
|
||
* - \c body_serialize:输出 VDE-TEXT 1.0(UTF-8,末尾 null 终止但 \c VdeBuffer.size
|
||
* 不含终止符);\c body_from_serialized 自动识别 VDE-TEXT / VDE 二进制;
|
||
* - \c body_from_mesh(ABI minor 1 / P1):三角网格 positions(3×N)+indices(3×M)
|
||
* → 实体;内部用 HalfedgeMesh::build_from_triangles + brep::mesh_to_brep_model,
|
||
* 与内置 STL/OBJ/PLY 导入同源转换(同输入得到同面数/同体积的 B-Rep)。
|
||
*/
|
||
#include "vde/plugin/vde_plugin_api.h"
|
||
|
||
namespace vde::plugin {
|
||
|
||
/// 构建几何宿主服务表(abi/version/allocator/log + P0 几何服务子集)
|
||
VdePluginHost make_geometry_host_services();
|
||
|
||
/// 释放服务表内部持有的资源(当前为无操作;保留接口用于 P1 线程本地错误缓存)
|
||
void release_geometry_host_services(VdePluginHost* host);
|
||
|
||
/// 读取当前线程最近一次 host->set_error 记录的文本(宿主侧诊断;空 = 无错误)
|
||
[[nodiscard]] const char* geometry_host_last_error();
|
||
|
||
/// 清空当前线程错误记录(宿主在调用插件前清空,便于判断本次调用是否报错)
|
||
void clear_geometry_host_last_error();
|
||
|
||
} // namespace vde::plugin
|