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.2 KiB
1.2 KiB
VDE-025: 缺少 MeshData→Assembly 便捷构建 API
- ID: VDE-025
- Date: 2026-07-28
- Status: Acknowledged
- Severity: Medium
- Category: API Gap
- Source: ViewDesign feat/viewdesign-engine branch
Issue
ViewDesign 的 InterferenceCheck::checkBatch 需要逐个将 Shape→BrepModel→Assembly 转换。
VDE 的 Assembly 树 API 直接操作 BrepModel,没有提供从 mesh 批量构建装配体的便捷 API。
// 当前流程(逐个转换,效率低):
for (auto& [name, shape] : shapes) {
auto brep = shapeMeshToBrep(*shape._impl()->mesh);
assy.root.add_part(name, std::move(brep), ident);
}
auto result = check_interference(assy);
期望有类似 build_assembly_from_meshes(vector<MeshInput>) 的批量构建 API,
内部优化转换和内存管理。
Suggested Fix
VDE 提供批量导入 API:
struct PartInput {
std::string name;
HalfedgeMesh mesh;
Transform3D transform;
};
Assembly build_assembly_from_meshes(
const std::vector<PartInput>& parts);
批量构建内部优化:
- 批量 mesh→BrepModel 转换(并行或流水线)
- 统一内存管理(避免碎片化)
- 可选的 transform 应用(避免事后逐个调用
apply_transform)