| name | solidworks-modeling |
| description | Plan, build, validate, and export SolidWorks CAD for one run of the CAD/CAE LangGraph loop. Use for part/assembly decomposition, parameters, stable interfaces, runtime wrapper calls, views, interference checks, exchange geometry, and a typed CAD-to-CAE handoff. |
SolidWorks Modeling
Create the Planner-owned design without changing requirements, then produce a
complete CadHandoff under the Runner-supplied output_directory.
Planning
- Read planning contract before generating
plans or calling SolidWorks.
- Read part plan schema for every custom
part.
- Read SW2025 Python COM compatibility
before changing execution code or diagnosing COM behavior.
- Decompose parts, parameters, manufacturing intent, stable references, and
assembly connections before execution.
- For assemblies, read assembly interface strategy
and part interface validation.
- For complex curved, moving, or clearance-sensitive geometry, read
inspection and interference.
- For repeated geometry, read native pattern strategy.
Use only USER_EXPLICIT, USER_APPROXIMATE, and MODEL_INFERRED for parameter
origin, independently from HARD_CONSTRAINT, DESIGN_TARGET, and
TUNABLE_PARAMETER engineering roles. Preserve every Planner value and mark
all engineering defaults or geometric decisions as inferred.
Runtime boundary
- Use
cad_runtime.solidworks wrappers; add a reusable wrapper before adding
raw COM to a task script.
- Run SolidWorks visibly and in an isolated runtime-owned process.
- Activate SolidWorks through the configured COM ProgID; never hard-code or
launch a machine-specific
SLDWORKS.exe path.
- Never attach to, close, or terminate a pre-existing SolidWorks process.
- Use native features for holes, fillets, chamfers, and repeated patterns.
- Treat a returned
None, failed rebuild, wrong entity count, or missing
feature-tree object as an execution failure.
- Write a
cad_execution_heartbeat.json before launch and update it after COM
connection, each major feature group, native save, preview export, and
exchange export.
Validation and handoff
Before returning ACCEPTED:
- rebuild and save native
SLDPRT/SLDASM files;
- validate stable interfaces and expected solid/surface body counts;
- export and inspect required previews;
- run interference checks for assemblies and moving mechanisms;
- export Parasolid
.x_t when possible, otherwise STEP;
- provide
part_parameters.json, modeling_plan.json,
interface_plan.json, optional connection_plan.json, validation report,
previews, and typed named references;
- provide a distinct validated analysis geometry for every Planner case that
needs a different physical domain, including closed fluid domains for CFD;
- keep every generated artifact below
output_directory and return paths
relative to the current run directory.
On retry, inspect the prior attempt output directories supplied by the Runner.
Reuse only artifacts that are rebuilt, rehashed, and revalidated against the
current Planner package. Do not redraw a valid model just to repair handoff
JSON. Do not configure a solver or invent CAE results.