# Solidworks Fillet Chamfer Cnc

SolidWorks CNC...

- Repository: https://github.com/wzyn20051216/solidworks-automation-skill (1661 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add wzyn20051216/solidworks-automation-skill --skill solidworks-fillet-chamfer-cnc -g -a claude-code -y`
Codex: `npx skills add wzyn20051216/solidworks-automation-skill --skill solidworks-fillet-chamfer-cnc -g -a codex -y`
Cursor: `npx skills add wzyn20051216/solidworks-automation-skill --skill solidworks-fillet-chamfer-cnc -g -a cursor -y`
Gemini CLI: `npx skills add wzyn20051216/solidworks-automation-skill --skill solidworks-fillet-chamfer-cnc -g -a gemini-cli -y`

## Description

SolidWorks CNC 零件的多圆角/倒角自动化子技能。用于安装座、连接块、支架、沉孔板等模型的参数预检、语义选边、多控制点可变半径、face/full-round/setback、G2 曲面组合、宽度-宽度倒角、角度倒角、孔口倒角、CNC 友好口袋、有界降级和重建证据。

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# SolidWorks Fillet Chamfer CNC

## 先判定任务模式

圆角/倒角多的模型，主要风险是拓扑变化、错误选边和不可制造参数，不是 API 参数本身。

- 新建 CNC 安装座或验证参数时，先使用模板脚本的 `--dry-run`；计划通过后再连接 SolidWorks。
- 修改既有零件时，先读取 [详细经验](references/cnc-fillet-chamfer-lessons.md) 的“既有模型选边”部分，不套用模板的固定期望边数。
- 用户要求可变半径、面圆角、full-round 或 setback 时，先运行本子技能的高级能力探测；SolidWorks 版本或输入拓扑不同于已验证样例时保持 `pilot`，不要跨版本直接宣称稳定。
- 多控制点、曲面组合和宽度-宽度倒角已经有 SW2026 SP1.1 独立真机证据，但换版本或换拓扑仍须复跑；保持线圆角已经跨 Python、C# PIA、SWBasic 和进程内非托管 C++ 复测，故障边界收敛在本机 SW2026 SP1.1 的 `ISetHoldLines` 调用，而非 Python 单一语言限制。该构建必须保持 `pilot/blocked`，不能退化成普通面圆角后声称成功。

## 模板入口

先做无 COM 预检：

```powershell
python subskills\solidworks-fillet-chamfer-cnc\scripts\create_cnc_mount_template.py `
  --dry-run `
  --set base_corner_radius=6 `
  --set chamfer_angle_deg=30 `
  --output-dir C:\CADAutomationWorkbench\cnc_mount
```

确认 `*_plan.json` 中 `validation.errors` 为空、语义目标和 `expected_edge_count` 符合设计，再删除 `--dry-run` 执行原生建模。大量参数优先放进 JSON：

```powershell
python subskills\solidworks-fillet-chamfer-cnc\scripts\create_cnc_mount_template.py `
  --params-json subskills\solidworks-fillet-chamfer-cnc\examples\cnc_mount_precision_params.json `
  --failure-policy strict `
  --output-dir C:\CADAutomationWorkbench\cnc_mount
```

`strict` 只接受请求尺寸；`progressive` 按 100%/75%/50% 尝试。发生降级时必须在交付摘要中写明实际尺寸，不能仍声称精确满足原值。

## 不可跳过的门禁

1. 原生建模前运行父技能 `scripts/sw_preflight.py`；`--dry-run` 不需要 SolidWorks。
2. 参数预检必须覆盖有限数值、圆角/倒角上限、孔槽碰撞、最小边壁、特征间净距、沉孔/口袋底壁和输出基名安全。
3. 新建模板按“基础体 → 立角圆角 → 外轮廓倒角 → 孔槽/口袋 → 孔口倒角”执行；既有模型根据依赖关系决定顺序。
4. 选边以几何签名和期望数量为证据。数量不符时停止，不用扩大坐标容差、`Edge1` 或屏幕点击猜边。
5. 每个圆角/倒角必须在重建后从特征树回读；COM 返回非空不等于持久化成功。
6. 生成后保存 SLDPRT、导出 STEP、运行 `sw_review.run_review()`，并人工查看等轴测和俯视预览。

## 高级圆角入口

先只读探测本机类型库，不启动 SolidWorks：

```powershell
python subskills\solidworks-fillet-chamfer-cnc\scripts\verify_advanced_fillets.py `
  --output-dir C:\CADAutomationWorkbench\advanced_fillet_probe
```

执行当前六项已通过的独立真机回归：

The rest: https://github.com/wzyn20051216/solidworks-automation-skill/blob/HEAD/subskills/solidworks-fillet-chamfer-cnc/SKILL.md
