修改agent流程,分步构建cdsl
This commit is contained in:
@@ -306,9 +306,14 @@ class Build123dGeometryAdapter:
|
||||
@staticmethod
|
||||
def body_geometry(body: Any) -> dict[str, Any]:
|
||||
bbox = body.bounding_box()
|
||||
# A feature history can contain several body IDs while still ending in
|
||||
# one connected solid (for example, a base extrusion followed by hole
|
||||
# cuts). Count the current OCC result, never feature history entries.
|
||||
solids = list(body.solids()) if hasattr(body, "solids") else [body]
|
||||
return {
|
||||
"bbox_mm": [bbox.min.X, bbox.min.Y, bbox.min.Z, bbox.max.X, bbox.max.Y, bbox.max.Z],
|
||||
"volume_mm3": float(body.volume),
|
||||
"solid_count": len(solids),
|
||||
}
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user