x
This commit is contained in:
@@ -29,6 +29,8 @@ class CAMBundleService:
|
||||
mold_steel=mold_steel,
|
||||
surface_quality=surface_quality,
|
||||
controller=controller,
|
||||
core_bbox=cavity_bbox, # MVP: 型芯 bbox 复用型腔 bbox
|
||||
undercut_regions=scheme.get("undercut_regions") if scheme else None,
|
||||
)
|
||||
|
||||
process_plan = self._build_process_plan(cam_result.get("operations", []))
|
||||
@@ -55,6 +57,26 @@ class CAMBundleService:
|
||||
if include_gcode:
|
||||
bundle["gcode"] = cam_result.get("gcode", "")
|
||||
bundle["gcode_lines"] = cam_result.get("gcode_lines", 0)
|
||||
|
||||
# 可选:EDM 电极方案
|
||||
edm = cam_result.get("edm")
|
||||
if edm and edm.get("electrodes"):
|
||||
bundle["edm"] = {
|
||||
"electrode_count": edm.get("total_electrode_count", 0),
|
||||
"total_volume_cm3": edm.get("total_volume_cm3", 0),
|
||||
"material": edm.get("material", "copper"),
|
||||
"recommendations": edm.get("recommendations", []),
|
||||
}
|
||||
|
||||
# 可选:加工仿真摘要
|
||||
sim = cam_result.get("simulation")
|
||||
if sim:
|
||||
bundle["simulation"] = {
|
||||
"removed_percent": sim.get("total_volume_removed_percent", 0),
|
||||
"gouging_detected": bool(sim.get("gouging_detected")),
|
||||
"quality": sim.get("quality_assessment", {}),
|
||||
}
|
||||
|
||||
return bundle
|
||||
|
||||
@staticmethod
|
||||
|
||||
@@ -494,7 +494,7 @@ class ProcessingService:
|
||||
"generated_at": datetime.now().isoformat(),
|
||||
"schemes": {},
|
||||
}
|
||||
components = ["cavity", "core", "parting_surface"]
|
||||
components = ["cavity", "core", "parting_surface", "product", "a_plate", "b_plate"]
|
||||
|
||||
for scheme_id, cavity_data in export_shapes.items():
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user