Files
hm 6f44d48d29
Build & Test / build-and-test (push) Canceled after 0s
VDE Build & Test / build-and-test (push) Canceled after 0s
Build & Test / python-bindings (push) Canceled after 0s
feat: P2-5c 圆角盒 seam 归零 + P3-4/5/6/7 收口(1.0.68)
### P2-5c 圆角盒残余 seam 96→0
- 根因:平面单环耳切剔除共线中间点,与共享采样 3 段边界不一致;新增 restore_ring_boundary_points 把共享边界点逐点补回;
- 26 面圆角盒 open 96→0(Plane/Cylinder/Sphere 全 0),tris 6396,box 类保持 0;平面面与曲面相邻时 10 tris/面(纯平面 box 仍 2),
  测试断言按新语义更新;

### P3-4 外部服务 OS 级沙箱
- vde-service.json limits(max_memory_mb/max_cpu_seconds/max_processes/kill_on_close);Windows Job Object(挂起创建→Assign→Resume、
  KILL_ON_JOB_CLOSE、内存/CPU/进程数限制事件)+ POSIX setsid/rlimit;结果 limit_exceeded/limit_kind;
- test_plugin_external_service 18/18(内存/CPU/进程数超限、kill_on_close 回收、旧行为、非法清单);docs 更新;

### P3-5 插件 DLL 工件哈希 + 密钥轮换/吊销
- manifest artifacts[{path,sha256}]/key_id;SHA-256 自实现 + 路径白名单;Policy require_artifact_hashes/trusted_keys/revoked_key_ids;
  新错误码;evaluate 扩展 + manager hook 已接线;tool verify --hash/--key-id;test_plugin_security 42/42;docs plugin-security §4.5/§4.6;

### P3-6 C++ 跨 DLL ABI 边界定稿(opt-in 实验)
- VDE_BUILD_CPP_SHARED(默认 OFF)12 内核模块 SHARED + consumer smoke(CPP_SHARED_CONSUMER_PASS faces=6 volume=6000);
- 决策:保持 C++ 静态 + 纯 C ABI + 插件默认;跨 DLL 单例/STL/RTTI/导出规模风险,实验仅 opt-in;architecture §7.8/design §13;

### P3-7 MSVC/Linux 跨平台验证收口
- .github/workflows/ci.yml 新增 windows-msvc job(YAML 校验通过);vde_platform UTF-8 宽 API/error/自守卫修复;
- 可移植性审计 12 类;docs/guides/cross-platform-validation.md;本机无 MSVC/WSL/docker,实机由 CI 反馈;

### VDE-1249 / 工程
- 反馈单更新:圆角盒 open 960→96→0,1.0.68 预算 Normal≈6396,宿主复测指引改 1.0.68;
- 版本 1.0.68;全量构建 0 error(340 targets);全量 ctest 7472 注册、7377/7377 PASS(0 failed,25 skipped,560.68s)。
2026-10-28 20:49:27 +08:00

30 lines
1.3 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* @file main.cpp
* @brief 微内核 P3-6:C++ 跨 DLL ABI 实验最小消费者
*
* 消费者只链接内核 C++ SHARED 库的导入库(不静态链接内核),执行:
* create box → body_volume() → to_mesh(0.01) → 三角形数断言
* 成功输出 CPP_SHARED_CONSUMER_PASS(CTest PASS_REGULAR_EXPRESSION)。
* 该实验用于验证:导出宏/符号可见性、跨 DLL 单例/静态注册表、STL/分配器边界;
* 结论与边界见 docs/guides/architecture.md §7.8。
*/
#include "vde/brep/brep.h"
#include "vde/brep/modeling.h"
#include "vde/mesh/halfedge_mesh.h"
#include <cstdio>
int main() {
const vde::brep::BrepModel box = vde::brep::make_box(10.0, 20.0, 30.0);
const double volume = box.body_volume();
const vde::mesh::HalfedgeMesh mesh = box.to_mesh(0.01);
const std::size_t triangles = mesh.num_faces(); // HalfedgeMesh 的面即三角形
const std::size_t faces = box.num_faces();
const double expected_volume = 10.0 * 20.0 * 30.0;
const bool ok = faces == 6 && triangles > 0 &&
volume > 0.0 && volume < expected_volume * 1.5;
std::printf("CPP_SHARED_CONSUMER_%s faces=%zu volume=%.6f triangles=%zu\n",
ok ? "PASS" : "FAIL", faces, volume, triangles);
return ok ? 0 : 1;
}