From 36c55eb66362a8a7dafa100d2259ec04f4792d29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=82=E4=B9=8B=E9=92=B3?= Date: Fri, 24 Jul 2026 12:41:00 +0000 Subject: [PATCH] feat(v3.3): DEB packaging + development plan --- docs/12-v3.3-开发计划.md | 59 +++++++++++++++++++++++++++++++++++++++ packaging/DEBIAN/control | 15 ++++++++++ packaging/DEBIAN/postinst | 2 ++ packaging/build-deb.sh | 30 ++++++++++++++++++++ 4 files changed, 106 insertions(+) create mode 100644 docs/12-v3.3-开发计划.md create mode 100644 packaging/DEBIAN/control create mode 100755 packaging/DEBIAN/postinst create mode 100755 packaging/build-deb.sh diff --git a/docs/12-v3.3-开发计划.md b/docs/12-v3.3-开发计划.md new file mode 100644 index 0000000..97038f7 --- /dev/null +++ b/docs/12-v3.3-开发计划.md @@ -0,0 +1,59 @@ +# ViewDesignEngine v3.3 工业级强化计划 + +> 制定: 2026-07-24 | 状态: 执行中 + +--- + +## 1. 🎯 B-Rep 面分割(Face Splitting) + +当前布尔运算用 centroid 射线法分类,精度差。需要真正的面-面求交分割。 + +- [ ] 实现 `split_face_by_plane(face, plane)` — 平面分割单个面 +- [ ] 实现 `split_face_by_face(face_a, face_b)` — 两个曲面求交分割 +- [ ] 集成到 brep_boolean.cpp 替换 centroid 分类 +- [ ] Validity 测试:分割后的面子集构成合法壳 + +## 2. 📐 NURBS 曲面求交 + +核心工业几何算法。B-Rep 布尔依赖此。 + +- [ ] 实现 `intersect_surfaces(surf_a, surf_b)` → 交线曲线列表 +- [ ] 算法:递归细分 + bounding box 剔除 + 牛顿精化 +- [ ] 支持平面-曲面、曲面-曲面的交线计算 +- [ ] 测试:平面交平面、平面交圆柱、圆柱交球 + +## 3. 🖥️ WebGL 查看器 + +在线预览 GLB/STL,嵌入 Gitea Wiki。 + +- [ ] 创建 `viewer/` 目录,含 Three.js 单页应用 +- [ ] 拖拽上传 GLB/STL 文件,Three.js 渲染 +- [ ] 嵌入到 Wiki Home 页 +- [ ] 支持旋转、缩放、线框/实体切换 + +## 4. 📦 Linux 包 + +降低安装门槛。 + +- [ ] 创建 `packaging/DEBIAN/` 目录 +- [ ] `control` + `rules` + `cmake` 安装 +- [ ] `make deb` 目标 +- [ ] 测试 `apt install ./vde-3.3.0.deb` + +## 5. 📖 教程文档 + +从零开始的实用指南。 + +- [ ] `docs/tutorial/01-quickstart.md` — 5 分钟上手 +- [ ] `docs/tutorial/02-sdf-modeling.md` — SDF 隐式建模 +- [ ] `docs/tutorial/03-brep-modeling.md` — B-Rep 工业建模 +- [ ] `docs/tutorial/04-export.md` — STEP/STL/GLB 导出 + +## 6. 🧪 模糊测试 + +随机几何输入 + 断言,发现隐蔽 bug。 + +- [ ] `tests/fuzz/fuzz_boolean.cpp` — 随机 B-Rep 布尔 +- [ ] `tests/fuzz/fuzz_sdf.cpp` — 随机 SDF 参数 +- [ ] `tests/fuzz/fuzz_iges.cpp` — 随机 IGES round-trip +- [ ] CI 集成:每次 push 跑 100 轮模糊测试 diff --git a/packaging/DEBIAN/control b/packaging/DEBIAN/control new file mode 100644 index 0000000..27ed9e3 --- /dev/null +++ b/packaging/DEBIAN/control @@ -0,0 +1,15 @@ +Package: vde +Version: 3.3.0 +Section: libs +Priority: optional +Architecture: amd64 +Depends: libc6 (>= 2.35), libstdc++6 (>= 11), libeigen3-dev +Maintainer: ViewDesignEngine +Description: High-performance C++ CAD geometry engine + ViewDesignEngine is a full-stack computational geometry engine + covering NURBS curves/surfaces, mesh processing, B-Rep modeling, + SDF implicit modeling, differentiable geometry, and industrial + format interoperability (STEP, IGES, glTF, STL, 3MF). + . + Modules: foundation, core, curves, mesh, spatial, boolean, + collision, brep, sdf, sketch, capi. diff --git a/packaging/DEBIAN/postinst b/packaging/DEBIAN/postinst new file mode 100755 index 0000000..4a4a245 --- /dev/null +++ b/packaging/DEBIAN/postinst @@ -0,0 +1,2 @@ +#!/bin/sh +ldconfig diff --git a/packaging/build-deb.sh b/packaging/build-deb.sh new file mode 100755 index 0000000..384dce0 --- /dev/null +++ b/packaging/build-deb.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Build DEB package for ViewDesignEngine +set -e + +VERSION=${1:-3.3.0} +BUILD_DIR=build-deb +DEB_DIR=packaging + +# Build the project +cmake -B $BUILD_DIR -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr +cmake --build $BUILD_DIR -j$(nproc) + +# Install to staging area +rm -rf $DEB_DIR/vde +cmake --install $BUILD_DIR --prefix $DEB_DIR/vde/usr + +# Copy headers +mkdir -p $DEB_DIR/vde/usr/include +cp -r include/vde $DEB_DIR/vde/usr/include/ + +# Copy DEBIAN control files +cp -r $DEB_DIR/DEBIAN $DEB_DIR/vde/ + +# Set version +sed -i "s/Version:.*/Version: $VERSION/" $DEB_DIR/vde/DEBIAN/control + +# Build .deb +dpkg-deb --build $DEB_DIR/vde vde-${VERSION}-amd64.deb + +echo "Package built: vde-${VERSION}-amd64.deb"