Files
ViewDesignEngine/docs/feedback/VDE-020.md
T
茂之钳 aeb29ab87c
CI / Build & Test (push) Failing after 41s
CI / Release Build (push) Failing after 33s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
fix(v1.0.3): VDE-019 center参数 + VDE-020 cone/torus + VDE-022 位置查询 + VDE-026 BVH索引
VDE-019 (Fixed): make_box/make_cylinder/make_sphere 添加 Point3D center 参数
VDE-020 (Fixed): 新增 make_cone(r1,r2,height) 和 make_torus(rMajor,rMinor) 基本体
VDE-022 (Partially Fixed): 添加 get_edge_index_by_position / get_face_index_by_position / fillet_by_position / chamfer_by_position
VDE-026 (Fixed): Triangle3D 添加 int id 字段,BVH::build() 自动赋值索引,HitResult 添加 tri_index
VDE-021/023/024/025 (Acknowledged): mesh→NURBS 转换等复杂几何算法,需求已记录

反馈来自 ViewDesign feat/viewdesign-engine 分支
2026-07-28 17:08:03 +08:00

1.4 KiB
Raw Blame History

VDE-020: 缺少 make_cone 和 make_torus 基本体

  • ID: VDE-020
  • Date: 2026-07-28
  • Status: Fixed
  • Severity: Medium
  • Category: API Gap
  • Source: ViewDesign feat/viewdesign-engine branch

Issue

VDE 的 modeling.h 中仅提供了 make_boxmake_cylindermake_sphere 三个基本体, 缺少以下常用基本体:

  • cone(圆台/圆锥):make_cone(r1, r2, height) — 常用机械零件(减速器、轴端、夹具定位销等)
  • torus(圆环):make_torus(rMajor, rMinor) — 密封圈、管道弯头、O型圈槽等

对比 OCCTBRepPrimAPI_MakeConeBRepPrimAPI_MakeTorus 已存在。

Current Workaround (ViewDesign)

ViewDesign 的 cone 和 torus 在 VDE 后端下回退到纯 C++ 手动 mesh 生成(正弦/余弦采样 + 三角剖分),精度和质量较低。

Suggested Fix

vde::brep::modeling.h 中添加:

BrepModel make_cone(double r1, double r2, double height,
                    const Point3D& center = Point3D(0, 0, 0));
BrepModel make_torus(double rMajor, double rMinor,
                     const Point3D& center = Point3D(0, 0, 0));
  • make_cone(r1, r2, height) — r1 为底半径,r2 为顶半径(r2=0 为圆锥)
  • make_torus(rMajor, rMinor) — rMajor 为中心环半径,rMinor 为管半径
  • 如果 VDE-019 被修复,建议同时支持 center 参数