list_edges
Enumerate edges of solid bodies and obtain midpoint coordinates for reliable fillet and chamfer operations.
Instructions
Listar aristas — enumerate edges of one or all solid bodies.
Returns one dict per edge with:
- index: 0-based per-body. NOT durable across rebuilds.
- body_name: which body the edge belongs to.
- type: "line" | "circle" | "other"
- midpoint_mm: [x, y, z] in mm. DURABLE reference for fillet/chamfer.
None for closed-loop edges (full circles) — a circle has no
canonical midpoint. For those, pass edge_indices to
fillet/chamfer instead of edge_midpoints_mm. Partial arcs
(post-fillet corner arcs) and line edges DO have midpoints.
- length_mm: edge length in mm (None for closed loops).
Args: body_name: If given, return only edges of that body. Else return edges of every solid body in the active part.
Use case: pre-fillet/pre-chamfer LLM workflow. The LLM enumerates edges, reasons spatially ("the four top edges have z=10mm"), then passes midpoints to fillet() / chamfer().
Caveat: in this SolidWorks binding, edges can't be selected by name string in part-doc context — coordinate matching is the only durable address. Use the midpoint values returned here verbatim; don't recompute them in the LLM.
Example — list every edge in the active part: edges = list_edges() # edges = [{"index": 0, "body_name": "Saliente-Extruir1", # "type": "line", "midpoint_mm": [0, 0, 5], ...}, ...]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |