aeb29ab87c
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 分支
1.4 KiB
1.4 KiB
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_box、make_cylinder、make_sphere 三个基本体,
缺少以下常用基本体:
- cone(圆台/圆锥):
make_cone(r1, r2, height)— 常用机械零件(减速器、轴端、夹具定位销等) - torus(圆环):
make_torus(rMajor, rMinor)— 密封圈、管道弯头、O型圈槽等
对比 OCCT:BRepPrimAPI_MakeCone 和 BRepPrimAPI_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 参数