docs: add VDE-014/015/016 + update overview (7 fixed, 3 new, 1 P0 remaining)
This commit is contained in:
@@ -1,15 +1,58 @@
|
|||||||
---
|
---
|
||||||
id: OVERVIEW
|
id: OVERVIEW
|
||||||
status: resolved
|
status: open
|
||||||
severity: medium
|
severity: medium
|
||||||
category: analysis
|
category: analysis
|
||||||
date: 2026-07-27
|
date: 2026-07-27
|
||||||
|
updated: 2026-07-27
|
||||||
reporter: ViewDesign
|
reporter: ViewDesign
|
||||||
---
|
---
|
||||||
|
|
||||||
# ViewDesignEngine 集成综合评估
|
# ViewDesignEngine 集成综合评估
|
||||||
|
|
||||||
> 基于 VDE v1.0.1 在 ViewDesign 工程中的集成经验,从多个维度评估 VDE 的优势与不足。
|
> 基于 VDE v1.0.1+ 在 ViewDesign 工程中的集成经验,从多个维度评估 VDE 的优势与不足。
|
||||||
|
|
||||||
|
## v1.0.1+ 更新总结
|
||||||
|
|
||||||
|
VDE 团队快速响应了反馈,v1.0.1+ 更新修复了 7 个问题,引入了 3 个新问题。
|
||||||
|
|
||||||
|
### 已修复(7 个)
|
||||||
|
|
||||||
|
| 问题 | 内容 | 状态 |
|
||||||
|
|------|------|:--:|
|
||||||
|
| VDE-001/005/010 | 两阶段名称查找 | 大部分 brep 文件已修复 |
|
||||||
|
| VDE-002 | 子模块 include 路径 | 改用 CMAKE_CURRENT_SOURCE_DIR |
|
||||||
|
| VDE-006 | vde_mesh↔vde_brep 循环依赖 | 已解除 |
|
||||||
|
| VDE-009 | 缺少 C API 文档 | 新增 basic_usage.cpp |
|
||||||
|
| VDE-011 | write_stl 返回 void | 改为 bool |
|
||||||
|
| VDE-012 | double/float 精度 | 新增 StlTrianglef |
|
||||||
|
|
||||||
|
### 新增(3 个)
|
||||||
|
|
||||||
|
| 问题 | 内容 | 状态 |
|
||||||
|
|------|------|:--:|
|
||||||
|
| VDE-014 | write_stl 新旧声明并存 | open |
|
||||||
|
| VDE-015 | Vector3F/Point3F 拼写错误 | open |
|
||||||
|
| VDE-016 | ssi_boolean.cpp 两阶段查找修正不完整 | open |
|
||||||
|
|
||||||
|
### 当前可用模块(6/9)
|
||||||
|
|
||||||
|
```
|
||||||
|
vde_foundation ✓ vde_core ✓
|
||||||
|
vde_curves ✓ vde_spatial ✓
|
||||||
|
vde_collision ✓ vde_sketch ✓
|
||||||
|
vde_brep ✗ vde_mesh ✗
|
||||||
|
vde_boolean ✗ vde_sdf ✗
|
||||||
|
vde_capi ✗
|
||||||
|
```
|
||||||
|
|
||||||
|
### P0 剩余(1 个)
|
||||||
|
|
||||||
|
| 优先级 | 问题 | 影响 |
|
||||||
|
|:--:|------|------|
|
||||||
|
| P0 | VDE-016: ssi_boolean.cpp 两阶段查找残余 | vde_brep 仍然不可用 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## VDE vs OCCT 对比
|
## VDE vs OCCT 对比
|
||||||
|
|
||||||
@@ -18,41 +61,18 @@ reporter: ViewDesign
|
|||||||
| 代码体积 | ~1GB+,构建 30min+ | 轻量,构建秒级 | VDE 胜 |
|
| 代码体积 | ~1GB+,构建 30min+ | 轻量,构建秒级 | VDE 胜 |
|
||||||
| 数学库 | 自研 gp_*,API 陈旧 | Eigen3,现代 C++ | VDE 胜 |
|
| 数学库 | 自研 gp_*,API 陈旧 | Eigen3,现代 C++ | VDE 胜 |
|
||||||
| API 风格 | 重型,Handle<> 到处飞 | 简洁值语义 | VDE 胜 |
|
| API 风格 | 重型,Handle<> 到处飞 | 简洁值语义 | VDE 胜 |
|
||||||
| B-rep | 完整、成熟 | brep 模块 GCC 编译不过 | OCCT 胜 |
|
| B-rep | 完整、成熟 | brep 仅 1 个文件编译不过 | OCCT 胜(差距缩小) |
|
||||||
| STL I/O | 无便捷函数 | read_stl() / write_stl() | VDE 胜 |
|
| STL I/O | 无便捷函数 | read_stl() / write_stl() | VDE 胜 |
|
||||||
| 跨平台 | 全通过 | 主要 MSVC | OCCT 胜 |
|
| 跨平台 | 全通过 | 6/9 模块可用(GCC) | OCCT 胜(差距缩小) |
|
||||||
| 文档 | 丰富 | 几乎为零 | OCCT 胜 |
|
| 文档 | 丰富 | 正在改善(basic_usage.cpp) | OCCT 胜 |
|
||||||
| 许可证 | LGPL-like,商用需谨慎 | AGPL v3 | VDE 胜 |
|
| 许可证 | LGPL-like,商用需谨慎 | AGPL v3 | VDE 胜 |
|
||||||
| 集成门槛 | 需要 SDK 安装 | submodule + Eigen3 | VDE 胜 |
|
| 集成门槛 | 需要 SDK 安装 | submodule + Eigen3 | VDE 胜 |
|
||||||
|
|
||||||
## VDE 优点
|
|
||||||
|
|
||||||
- 轻量、模块化设计方向正确
|
|
||||||
- Eigen3 选型正确(现代 C++ 数学库标准)
|
|
||||||
- API 直觉好:Transform3D.translate()、write_stl() 一行搞定
|
|
||||||
- 许可干净(AGPL v3,与 ViewDesign 一致)
|
|
||||||
|
|
||||||
## VDE 不足
|
|
||||||
|
|
||||||
- B-rep 是核心短板(几何引擎最有价值的部分不可用)
|
|
||||||
- 移植意识弱(为 MSVC 开发,无跨平台 CI)
|
|
||||||
- 文档基建缺失(无 doxygen,无示例,无 CI)
|
|
||||||
- 模块有循环依赖(vde_mesh ↔ vde_brep)
|
|
||||||
- CMake 集成不友好(无模块开关,无 find_package)
|
|
||||||
|
|
||||||
## 阻塞优先级
|
|
||||||
|
|
||||||
| 优先级 | 问题 | 影响 |
|
|
||||||
|:--:|------|------|
|
|
||||||
| P0 | 两阶段名称查找 (VDE-001/005/010) | brep/mesh/boolean 全部不可用 |
|
|
||||||
| P0 | include 路径不兼容子模块 (VDE-002) | 无法开箱即用 |
|
|
||||||
| P0 | 无模块级构建开关 (VDE-013) | 被迫 EXCLUDE_FROM_ALL hack |
|
|
||||||
|
|
||||||
## ViewDesign 的战略路径
|
## ViewDesign 的战略路径
|
||||||
|
|
||||||
```
|
```
|
||||||
当前: 网格路径→VDE / B-rep→OCCT 兜底
|
当前: 6/9 模块可用 / vd_geom 网格路径→VDE / B-rep→OCCT 兜底
|
||||||
P0后: B-rep→VDE / OCCT 降级为可选
|
P0后: 9/9 模块可用 / B-rep→VDE / OCCT 降级为可选
|
||||||
远期: 全面 VDE / OCCT 移除
|
远期: 全面 VDE / OCCT 移除
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
id: VDE-014
|
||||||
|
status: open
|
||||||
|
severity: high
|
||||||
|
category: bug
|
||||||
|
date: 2026-07-27
|
||||||
|
reporter: ViewDesign
|
||||||
|
related: VDE-011
|
||||||
|
---
|
||||||
|
|
||||||
|
# VDE-014: write_stl / write_stl_ascii 新旧声明并存
|
||||||
|
|
||||||
|
## 问题描述
|
||||||
|
|
||||||
|
`io_stl.h` 中 `write_stl` 和 `write_stl_ascii` 同时存在 `void` 和 `bool` 版本,导致编译二义性:
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
// io_stl.h:94 — 旧声明(应删除)
|
||||||
|
void write_stl(const std::string& filepath, const std::vector<StlTriangle>& tris);
|
||||||
|
|
||||||
|
// io_stl.h:95 — 新声明(正确)
|
||||||
|
bool write_stl(const std::string& filepath, const std::vector<StlTriangle>& tris);
|
||||||
|
|
||||||
|
// io_stl.h:118 — 旧声明(应删除)
|
||||||
|
void write_stl_ascii(const std::string& filepath, const std::vector<StlTriangle>& tris);
|
||||||
|
|
||||||
|
// io_stl.h:119 — 新声明(正确)
|
||||||
|
bool write_stl_ascii(const std::string& filepath, const std::vector<StlTriangle>& tris);
|
||||||
|
```
|
||||||
|
|
||||||
|
## 编译错误
|
||||||
|
|
||||||
|
```
|
||||||
|
error: 'void value not ignored as it ought to be'
|
||||||
|
error: ambiguating new declaration of 'bool vde::foundation::write_stl(...)'
|
||||||
|
```
|
||||||
|
|
||||||
|
## 当前 Workaround
|
||||||
|
|
||||||
|
ViewDesign 创建了 `cmake/vde_fixes/vde/foundation/io_stl.h` 副本并覆盖 include 路径。
|
||||||
|
|
||||||
|
## 建议修复
|
||||||
|
|
||||||
|
删除旧的 `void` 版本声明(第 94、118 行),仅保留 `bool` 版本。
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
id: VDE-015
|
||||||
|
status: open
|
||||||
|
severity: medium
|
||||||
|
category: bug
|
||||||
|
date: 2026-07-27
|
||||||
|
reporter: ViewDesign
|
||||||
|
---
|
||||||
|
|
||||||
|
# VDE-015: StlTrianglef 中 Vector3F / Point3F 拼写错误
|
||||||
|
|
||||||
|
## 问题描述
|
||||||
|
|
||||||
|
`io_stl.h` 中 `StlTrianglef` 结构体使用了 `Vector3F` 和 `Point3F`,但 `math_types.h` 中定义的类型是 `Vector3f` 和 `Point3f`(小写 `f`):
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
// io_stl.h:126-128 — 当前(错误)
|
||||||
|
struct StlTrianglef {
|
||||||
|
Vector3F normal; // 应为 Vector3f
|
||||||
|
Point3F v0, v1, v2; // 应为 Point3f
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
## 编译错误
|
||||||
|
|
||||||
|
```
|
||||||
|
error: 'Vector3F' does not name a type
|
||||||
|
error: 'Point3F' does not name a type
|
||||||
|
error: 'Vector3F' is not a member of 'vde::foundation'
|
||||||
|
error: 'Point3F' is not a member of 'vde::foundation'
|
||||||
|
```
|
||||||
|
|
||||||
|
## 建议修复
|
||||||
|
|
||||||
|
改为正确的大小写:
|
||||||
|
|
||||||
|
```cpp
|
||||||
|
struct StlTrianglef {
|
||||||
|
Vector3f normal;
|
||||||
|
Point3f v0, v1, v2;
|
||||||
|
};
|
||||||
|
```
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
---
|
||||||
|
id: VDE-016
|
||||||
|
status: open
|
||||||
|
severity: high
|
||||||
|
category: bug
|
||||||
|
date: 2026-07-27
|
||||||
|
reporter: ViewDesign
|
||||||
|
related: VDE-001, VDE-005, VDE-010
|
||||||
|
---
|
||||||
|
|
||||||
|
# VDE-016: ssi_boolean.cpp 两阶段名称查找修正不完整
|
||||||
|
|
||||||
|
## 问题描述
|
||||||
|
|
||||||
|
v1.0.1+ 在 brep 模块 .cpp 文件中添加了 `using namespace vde::core;`,但 `ssi_boolean.cpp` 仍有未解决的符号:
|
||||||
|
|
||||||
|
| 符号 | 所在命名空间 | 补了 using 但缺啥 |
|
||||||
|
|------|-------------|-------------------|
|
||||||
|
| `face_normal` | `vde::brep::` 或全局 | 缺少 `using` 声明或 `#include` |
|
||||||
|
| `face_bounds` | `vde::brep::` 或全局 | 同上 |
|
||||||
|
| `SSICurveData` | `vde::brep::{anonymous}::` | 匿名命名空间中的类型需要完全限定名 |
|
||||||
|
| `begin` / `end` | `std::` | 需要 `#include <iterator>` |
|
||||||
|
|
||||||
|
## 编译错误
|
||||||
|
|
||||||
|
```
|
||||||
|
error: 'face_normal' was not declared in this scope
|
||||||
|
error: 'face_bounds' was not declared in this scope
|
||||||
|
error: 'SSICurveData' was not declared in this scope
|
||||||
|
note: 'vde::brep::{anonymous}::SSICurveData'
|
||||||
|
error: 'begin' was not declared in this scope
|
||||||
|
error: 'end' was not declared in this scope
|
||||||
|
```
|
||||||
|
|
||||||
|
## 当前 Workaround
|
||||||
|
|
||||||
|
ViewDesign 仍然 `EXCLUDE_FROM_ALL` vde_brep 模块。
|
||||||
|
|
||||||
|
## 建议修复
|
||||||
|
|
||||||
|
1. 检查 `face_normal`、`face_bounds` 定义位置,添加对应的 `using` 声明
|
||||||
|
2. 匿名命名空间中的 `SSICurveData` 需要在文件内显式 `using vde::brep::SSICurveData;`(或移出匿名空间)
|
||||||
|
3. 添加 `#include <iterator>` 解决 `begin`/`end`
|
||||||
Reference in New Issue
Block a user