Repository navigation
补充易错导入回归护栏并实机复核 issue #3 报告的五个工具 - #5
Merged
Merged
Conversation
- issue #3 报告的 draw_spline、list_mates、set_drawing_view、insert_section_view、 insert_detail_view 失效源于函数体内的 `from sw_core import ...` 绝对导入, 修复提交 10c2beb 已在 main;本批补上可重复验证的护栏 - tests/test_imports.py:按包逐个导入模块、拒绝绝对同级导入、确认五个工具已注册 - tests/live_reported_tools_regression.py:实机跑通五个工具,含样条段类型读回、 配合后的 list_mates、视图位置与比例读回、剖面视图 A-A 与局部视图 I 创建 - 225 项离线测试通过;隔离安装验收 225 项离线检查 + 192 个唯一工具 stdio 发现
RIPBillyMays
pushed a commit
to RIPBillyMays/solidworks-mcp
that referenced
this pull request
Oct 13, 2026
- Slacker-LLC#5 boss/cut `direction` (+normal/-normal) with direction_vector and volume_delta; Slacker-LLC#8 delete_feature clears selection and verifies; Slacker-LLC#9 suppression state before/after; #17 fillet refusals and option bits. - Slacker-LLC#7 open-sketch naming; Slacker-LLC#11 sketch_fillet by corner; Slacker-LLC#12 offset construct_original; #13 add_dimension anchor; #14 undo hint plus new delete_sketch_segment; #15 sketch axes in create/edit_sketch. - Slacker-LLC#10 rebuild warnings split, force_all fixed; #18 list_faces/edges limit and filters; #19 screenshot save_as; #21 output-root docs. - Rulebook candidates R-012..R-018; offline, verification and live reports. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
Issue #3 报告
draw_spline、list_mates、set_drawing_view、insert_section_view、insert_detail_view五个工具不可用,并在本地把函数体内的import sw_core改为相对导入后恢复。定位:这五个工具都在函数体内执行
from sw_core import ...。包以solidworks_mcp安装后该绝对导入必然失败,且只在调用该工具时才失败,所以离线测试全绿而真实安装里这些工具是坏的。修复提交10c2beb(作者 denglobert)已把 5 个文件中的 9 处导入改成相对导入,并已进入 main。本 PR 做什么
修复已在 main,这里补上可重复验证的护栏,避免同类问题再次漏过:
tests/test_imports.py:把solidworks_mcp下每个模块按包导入一次、用源码扫描拒绝绝对同级导入、确认五个工具仍注册(3 项检查)。tests/live_reported_tools_regression.py:在实机上真正调用这五个工具——样条段类型读回spline;装配体配合后list_mates读出「重合1」;set_drawing_view读回位置 130/120 mm 与比例 0.4;insert_section_view生成「剖面视图 A-A」;insert_detail_view生成「局部视图 I (1 : 2)」。验证
reported-tools-installed.log。reported-tools-live.log,五个工具全部 PASS,scratch 文档全部关闭(REMAINING [])。另发现(本 PR 未改动)
PyPI 上的
solidworks-mcp属于另一个项目(hjbaard/SolidWorks-MCP,最新 0.16.0,2026-10-10 发布),本仓库从未发布过该名字。server.json的packages[0].identifier指向该 PyPI 名:打 tag 发布时 PyPI 会拒绝该上传,uvx solidworks-mcp也会装到别人的服务器。MCP registry 目前没有io.github.limuzi013/solidworks-mcp条目。建议先换成可用且唯一的发布标识,再启用 tag 发布。