x
This commit is contained in:
@@ -140,8 +140,11 @@ class MoldCavityGenerator(BaseMoldGenerator):
|
||||
},
|
||||
"parting_surface": parting_geometry,
|
||||
"quality_checks": {
|
||||
"undercut_regions": cavity_data.get("undercut_regions", []),
|
||||
"side_actions": cavity_data.get("side_actions", {}),
|
||||
"undercut_summary": {
|
||||
"total_faces": len(cavity_data.get("undercut_regions", [])),
|
||||
"has_undercut": len(cavity_data.get("undercut_regions", [])) > 0,
|
||||
},
|
||||
"side_action_summary": cavity_data.get("side_actions", {}).get("summary", {}),
|
||||
},
|
||||
"manufacturing_info": {
|
||||
"estimated_mold_size": self._calculate_mold_size(analysis),
|
||||
|
||||
@@ -388,8 +388,24 @@ class LifterMechanismDesigner:
|
||||
}
|
||||
|
||||
def _calculate_lifter_angle(self, region: Dict) -> float:
|
||||
"""计算斜顶角度(通常5-15度)"""
|
||||
return 8.0
|
||||
"""基于倒扣深度和估算顶出行程计算斜顶角度(通常 5-15 度)。
|
||||
|
||||
angle = atan(undercut_depth / estimated_stroke)
|
||||
"""
|
||||
bbox = region.get("bbox", {})
|
||||
if "max" in bbox and "min" in bbox:
|
||||
lateral = max(
|
||||
abs(bbox["max"][0] - bbox["min"][0]),
|
||||
abs(bbox["max"][1] - bbox["min"][1]),
|
||||
abs(bbox["max"][2] - bbox["min"][2]),
|
||||
)
|
||||
else:
|
||||
lateral = 5.0
|
||||
|
||||
undercut_depth = lateral * 0.4
|
||||
estimated_stroke = max(undercut_depth * 3, 20.0)
|
||||
angle = math.degrees(math.atan(undercut_depth / estimated_stroke))
|
||||
return round(max(min(angle, 15.0), 5.0), 1)
|
||||
|
||||
def _calculate_lifter_stroke(self, region: Dict) -> float:
|
||||
"""计算斜顶行程"""
|
||||
|
||||
Reference in New Issue
Block a user