db0091de98
All four are major feature requests that require dedicated design/implementation phases: - VDE-122: DWG/DXF native import/export (license dependency) - VDE-124: Weld geometry creation + structural member profiles - VDE-125: 6 core surface tools (thicken/sew/boundary/fill/ruled/offset) - VDE-127: Equation engine + design table + sensor system
5.1 KiB
5.1 KiB
VDE-124: 焊接几何创建
Date: 2026-07-31 Severity: P0 (mechanical CAD 基础特征) Status: Acknowledged
Acknowledged Date: 2026-07-31
Resolution: P0 架构级需求。焊接几何创建(角焊缝/坡口焊缝/塞焊/槽焊)和结构构件型材库是重大功能模块,需要在 VDE 下一里程碑中统一规划和实现。当前 AssemblyFeatureType::WeldJoint 枚举标记已预留。
Summary
VDE 目前仅有 AssemblyFeatureType::WeldJoint 枚举标记,无任何实际焊接几何创建函数。
焊接是机械设计的基础需求,对标 SolidWorks Weldments 需补充完整的焊接几何能力。
Gap Analysis
| 功能 | SolidWorks 对应 | VDE 现状 |
|---|---|---|
| 角焊缝 (Fillet Weld) | ✅ | ❌ |
| 坡口焊缝 (Groove Weld: V/J/U) | ✅ | ❌ |
| 塞焊 (Plug Weld) | ✅ | ❌ |
| 槽焊 (Slot Weld) | ✅ | ❌ |
| 焊道几何生成 | ✅ (沿边扫掠) | ❌ |
| 焊接符号 3D 标注 | ✅ | ❌ (仅 PMIType 枚举) |
| 焊接切割清单 | ✅ | ❌ |
| 结构构件型材库 | ✅ (工字钢/槽钢/角钢/方管) | ❌ |
Proposed API
namespace vde::brep {
// ═══════════════════════════════════════════════════════════
// Weld Types (焊接类型)
// ═══════════════════════════════════════════════════════════
enum class WeldJointType {
Fillet, // 角焊缝 (三角形截面)
GrooveV, // V 型坡口焊缝
GrooveJ, // J 型坡口焊缝
GrooveU, // U 型坡口焊缝
SquareButt, // I 型对接焊缝
BevelButt, // 单边 V 型坡口焊缝
Plug, // 塞焊
Slot // 槽焊
};
// 焊缝参数
struct WeldParams {
WeldJointType type = WeldJointType::Fillet;
double size = 3.0; // 焊脚尺寸 (fillet) 或焊缝宽度
double depth = 3.0; // 熔深
double length = 0.0; // 0=全段焊接, >0=指定长度
double pitch = 0.0; // 间断焊间距 (0=连续焊)
bool all_around = false; // 圆周焊接符号
bool field_weld = false; // 现场焊接符号
std::string contour = "flat"; // flat/convex/concave
};
// 焊缝结果
struct WeldBeadResult {
BrepModel bead_body; // 焊道几何体
double volume = 0.0; // 焊料体积 (用于成本估算)
std::string weld_symbol; // 自动生成的焊接符号文本
};
// ═══════════════════════════════════════════════════════════
// API
// ═══════════════════════════════════════════════════════════
/// 在两零件之间创建焊缝
[[nodiscard]] WeldBeadResult create_weld(
const Assembly& assembly,
const std::string& part_a,
const std::string& part_b,
int edge_id_a, int edge_id_b,
const WeldParams& params);
/// 在单一边缘创建焊缝 (非装配模式)
[[nodiscard]] WeldBeadResult create_weld_on_edge(
const BrepModel& body,
int edge_id,
const core::Vector3D& weld_direction,
const WeldParams& params);
/// 创建坡口焊缝
[[nodiscard]] WeldBeadResult create_groove_weld(
const BrepModel& body_a,
const BrepModel& body_b,
const core::Vector3D& groove_normal,
double root_gap, double groove_angle_deg,
const WeldParams& params);
/// 批量焊接 (焊接装配)
struct AssemblyWeldResult {
std::vector<WeldBeadResult> beads;
double total_weld_volume = 0.0;
std::vector<std::string> cut_list; // 切割清单
};
[[nodiscard]] AssemblyWeldResult create_assembly_welds(
const Assembly& assembly,
const std::vector<std::tuple<std::string,std::string,int,int>>& weld_specs,
const WeldParams& params);
// ═══════════════════════════════════════════════════════════
// Structural Members (结构构件型材库)
// ═══════════════════════════════════════════════════════════
enum class StructuralShape {
IBeam, WideFlange, Channel, Angle, EqualAngle,
SquareTube, RectTube, RoundTube, RoundBar
};
struct StructuralMemberParams {
StructuralShape shape;
std::string size_spec = "100x50"; // 规格 (e.g. "I10", "50x50x6")
bool corner_treatment = false; // 端部修剪
};
[[nodiscard]] BrepModel create_structural_member(
const curves::NurbsCurve& path,
const StructuralMemberParams& params);
} // namespace vde::brep
Impact
- 焊接是钢结构/机械装配的基础连接方式
- 型材库是钢结构设计的核心需求(对标 SolidWorks Weldments)
- 缺失即无法完成焊接件设计