Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 57 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

> Version history splits in two: the `3.x` entries at the bottom are the
> original TypeScript/winax implementation. The project is now a Python +
> pywin32 MCP server and restarted its own versioning at `1.0.0`; `1.x`
> entries are the current line.
> pywin32 MCP server and restarted its own versioning at `1.0.0`; the `1.x`
> and `2.x` entries are the current line.

## [Unreleased]

## [2.0.0] - 2026-11-09

### Added

- **`solidworks-mcp-python selftest`** (#179; `--selftest` works too).
Expand Down Expand Up @@ -100,6 +102,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- **The beta tools' faults** (item 7 in the work queue):
- `calculate_mass_properties` reported moments of inertia in kg·m²
under a kg·mm² label; the values are now kg·mm², matching the label.
- `pattern_circular` and `mirror_feature` reported a pattern or mirror
of a cut (a ring of holes) as an error; any change in volume now
counts, and the reply gives `volume_change`.
- `delete_feature` names every feature it removed, dependents included,
and can delete a sketch a feature uses: the features built from it go
with it. SolidWorks refused that delete before.
- `create_extrusion` and `create_revolve` use the sketch `sketch_name`
names (a missing name fails, listing the sketches), and
`create_revolve` turns about the reference axis `axis_entity` names.
- `create_sketch` gives the sketch the `sketch_name` you ask for. SolidWorks
won't rename an open sketch, so `exit_sketch` names it and replies with
the final name; `create_sketch` replies with SolidWorks' name and
`name_on_exit`.
- `create_part` assigns its `material`; `get_material` also reports the
density; `check_interference` honours `include_hidden`; `save_as`
keeps an existing file unless `overwrite` is on; `execute_macro` runs
`repeat_count` times; `sketch_tutorial_simple_hole` points at
`create_cut_extrude`.
- On SolidWorks versions without `IMassProperty`, the products of
inertia Ixz and Iyz were swapped.
- The agent guides' examples no longer send `direction: "cut"` to
`create_extrusion` (use `create_cut_extrude`) or a sketch line as
`create_revolve`'s `axis_entity`, which takes a reference axis.
- `create_part`, `create_assembly` and `create_drawing` say that `name`
is only a label: SolidWorks names a new document itself.
- The 23 tools these fixes cover are now `stable`, each checked by a
live test (`tests/live/test_live_sw_beta_tools.py`).
- `delete_feature` asks the agent to check with the user first, and its
reply carries a `warning` naming everything else it deleted (a
sketch takes the features built from it).

- **`create_extrusion`'s reply says what was built** (#209): the end
condition SolidWorks used (`MidPlane` for `both_directions`), and the
thin wall. It used to echo `direction: blind`, so an agent concluded
Expand Down Expand Up @@ -141,6 +177,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- **BREAKING: inputs that did nothing are refused** (item 7). A call that
sends one gets an `invalid_input` error naming what to use instead:
- `create_extrusion.direction` (use `end_condition`) and
`create_revolve.direction` (use `both_directions`);
- `create_assembly.components` (use `insert_component`);
- `create_drawing.model_path` and `.sheet_format`, and
`create_technical_drawing`'s `template`, `sheet_size`, `sheet_format`,
`title`, `output_path`, `scale` and `auto_populate_views` (use
`generate_drawing_package`, `save_file` or `set_sheet_scale`);
`create_technical_drawing` takes `projection` instead;
- `save_file.force_save`; `options` on the five `export_*` tools;
- `check_interference.tolerance` and `.check_all_components`;
- all four `calculate_mass_properties` inputs;
- `execute_macro`'s `parameters`, `execution_parameters`, `target_file`,
`execution_mode`, `pause_on_error` and `log_execution`.
`add_drawing_view` refuses an `operation` other than `add`. Moments of
inertia from `calculate_mass_properties` are a million times larger
than before, because they are now in the kg·mm² their label always said.

- **Building the API index needs SolidWorks installed, not running**, and
never starts or calls SolidWorks. The lookups build the index themselves,
and an index written by an older version is rebuilt automatically. Without
Expand Down
4 changes: 2 additions & 2 deletions docs/agents/prompt-driven-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ The plan should include:
2. `add_centerline(...)` — the revolve axis
3. Multiple `add_line` and `add_arc` calls tracing the half-profile
4. `exit_sketch()`
5. `create_revolve(sketch_name="Sketch1", axis_entity="Line1", angle=360.0)`
5. `create_revolve(sketch_name="Sketch1", angle=360.0)` (it turns about the centreline)

If the LLM skips `add_centerline` or tries to use a construction line as the axis without naming it, correct before running:

```text
Step 3 is missing the centerline. Add:
add_centerline(start_x=0, start_y=0, end_x=830, end_y=0)
before the profile lines, and use that as the axis_entity in create_revolve.
before the profile lines; create_revolve turns about it.
```

---
Expand Down
10 changes: 5 additions & 5 deletions docs/agents/prompting-tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Name it "Cylinder".
{"tool": "add_centerline","args": {"x1": 0.0, "y1": 0.0, "x2": 80.0, "y2": 0.0}},
{"tool": "add_rectangle", "args": {"x1": 0.0, "y1": 0.0, "x2": 80.0, "y2": 25.0}},
{"tool": "exit_sketch", "args": {}},
{"tool": "create_revolve","args": {"sketch_name": "Sketch1", "axis_entity": "Line1", "angle": 360.0}},
{"tool": "create_revolve","args": {"sketch_name": "Sketch1", "angle": 360.0}},
{"tool": "save_as", "args": {"file_path": "C:\\Temp\\Cylinder.sldprt"}}
]
```
Expand Down Expand Up @@ -203,7 +203,7 @@ Name it "Baseball Bat Recreation".
{"tool": "add_line", "args": {"x1": 17.0, "y1": 22.0, "x2": 680.0, "y2": 35.0}},
{"tool": "add_arc", "args": {"center_x": 680.0, "center_y": 0.0, "start_x": 680.0, "start_y": 35.0, "end_x": 830.0, "end_y": 0.0}},
{"tool": "exit_sketch", "args": {}},
{"tool": "create_revolve", "args": {"sketch_name": "Sketch1", "axis_entity": "Line1", "angle": 360.0}},
{"tool": "create_revolve", "args": {"sketch_name": "Sketch1", "angle": 360.0}},
{"tool": "save_as", "args": {"file_path": "C:\\Temp\\Baseball Bat Recreation.sldprt"}}
]
```
Expand Down Expand Up @@ -240,12 +240,12 @@ Name "Mounting Plate".
{"tool": "add_circle", "args": {"center_x": -32.0, "center_y": 22.0, "radius": 3.0}},
{"tool": "add_circle", "args": {"center_x": 32.0, "center_y": 22.0, "radius": 3.0}},
{"tool": "exit_sketch", "args": {}},
{"tool": "create_extrusion","args": {"sketch_name": "Sketch2", "depth": 15.0, "direction": "cut"}}
{"tool": "create_cut_extrude","args": {"sketch_name": "Sketch2", "depth": 15.0}}
]
```

!!! note "Counterbore not yet supported directly"
`create_extrusion` with `direction=cut` creates a blind cut. For a true counterbore hole (two-step), run two separate cut extrusions or use `generate_vba_part_modeling`.
`create_cut_extrude` with a `depth` makes a blind cut. For a true counterbore hole (two-step), run two separate cut extrusions or use `generate_vba_part_modeling`.

---

Expand Down Expand Up @@ -303,7 +303,7 @@ Name "Bolt Circle Disc".
{"tool": "add_circle", "args": {"center_x": 0.0, "center_y": 30.0, "radius": 4.0}},
{"tool": "sketch_circular_pattern","args": {"entity": "Arc1", "count": 6, "angle": 60.0, "center_x": 0.0, "center_y": 0.0}},
{"tool": "exit_sketch", "args": {}},
{"tool": "create_extrusion","args": {"sketch_name": "Sketch2", "depth": 10.0, "direction": "cut"}}
{"tool": "create_cut_extrude","args": {"sketch_name": "Sketch2", "depth": 10.0}}
]
```

Expand Down
2 changes: 1 addition & 1 deletion docs/agents/reverse-engineering-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ Likely plan:
5. add_line(start_x=0, start_y=6, end_x=180, end_y=6) # shaft body
6. add_line(start_x=180, start_y=6, end_x=200, end_y=10) # crank end taper
7. exit_sketch()
8. create_revolve(sketch_name="Sketch1", axis_entity="Line1", angle=360.0)
8. create_revolve(sketch_name="Sketch1", angle=360.0)
```

### Step 3 — Screenshot the assembled view
Expand Down
2 changes: 1 addition & 1 deletion docs/agents/sample-models-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Create a baseball bat model:
- Barrel top: add_arc center at (680,0) from (680,35) to (680,-35) (semicircle)
- Return to origin on the axis
5. exit_sketch
6. create_revolve with sketch_name="Sketch1", axis_entity="Line1", angle=360.0
6. create_revolve with sketch_name="Sketch1", angle=360.0 (about the centreline)
```

!!! tip "Why revolve first?"
Expand Down
Loading
Loading