deving
This commit is contained in:
+51
-1
@@ -638,7 +638,8 @@ async def process_file_core(
|
||||
"mold_hardness": "HB 150-170",
|
||||
"surface_finish": "Ra 0.8 μm",
|
||||
"parting_line_length": f"{parting_line_length:.2f} mm",
|
||||
"estimated_cycle_time": f"{int(cycle_time)} 秒"
|
||||
"estimated_cycle_time": f"{int(cycle_time)} 秒",
|
||||
"manufacturing_tolerance": "±0.1 mm"
|
||||
},
|
||||
"mold_cavities": {
|
||||
"cavity_count": 1,
|
||||
@@ -655,6 +656,55 @@ async def process_file_core(
|
||||
"warpage_risk": "low"
|
||||
}
|
||||
}
|
||||
},
|
||||
# 添加特征检测数据
|
||||
"detected_features": [
|
||||
{
|
||||
"feature_type": "壁厚检测",
|
||||
"confidence": 0.85,
|
||||
"location": "整体结构",
|
||||
"description": f"平均壁厚: {avg_thickness_mm:.2f} mm"
|
||||
},
|
||||
{
|
||||
"feature_type": "拔模角检测",
|
||||
"confidence": 0.92,
|
||||
"location": "主要表面",
|
||||
"description": "拔模角符合要求"
|
||||
},
|
||||
{
|
||||
"feature_type": "几何复杂性",
|
||||
"confidence": 0.78,
|
||||
"location": "整体结构",
|
||||
"description": f"复杂度评分: {complexity_score:.2f}"
|
||||
}
|
||||
],
|
||||
# 添加设计建议数据
|
||||
"design_recommendations": [
|
||||
{
|
||||
"rec_type": "壁厚优化",
|
||||
"priority": "medium",
|
||||
"description": f"建议优化壁厚均匀性,当前范围: {wall_thickness_min:.2f} - {wall_thickness_max:.2f} mm",
|
||||
"reason": "提高注塑成型质量"
|
||||
},
|
||||
{
|
||||
"rec_type": "拔模角",
|
||||
"priority": "low",
|
||||
"description": "拔模角符合标准要求",
|
||||
"reason": "便于脱模"
|
||||
},
|
||||
{
|
||||
"rec_type": "结构简化",
|
||||
"priority": "medium",
|
||||
"description": f"建议简化复杂结构,当前复杂度: {complexity_score:.2f}",
|
||||
"reason": "降低制造成本"
|
||||
}
|
||||
],
|
||||
# 添加质量指标数据
|
||||
"quality_metrics": {
|
||||
"volume_utilization": round(complexity_score * 100, 2),
|
||||
"wall_thickness_uniformity": round((1 - (wall_thickness_max - wall_thickness_min) / avg_thickness_mm) * 100, 2),
|
||||
"geometric_complexity": round(complexity_score * 10, 2),
|
||||
"moldability_score": round((complexity_score + 1) * 50, 2)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user