convez.ai
SkillAutomaçãoAvançado
SHY-563

SolidWorks Draw — Modelagem Paramétrica por Linguagem Natural

SHY-563/solidworks-draw

Desenhe peças mecânicas no SolidWorks descrevendo-as em português

Ver no GitHub
InicialPluginScore · de 0 a 100

Skill de IA que converte descrições em linguagem natural em modelos CAD paramétricos no SolidWorks. Integra bibliotecas de design, regras de engenharia e base de materiais para inferir parâmetros ausentes, oferecendo confirmação antes da geração do código Python da API.

Instalação

$npx convez-ai SHY-563/solidworks-draw

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
7
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 5 meses
Versão
—
Issues abertas
0
Contribuidores
1

Casos de uso

  • Modelagem rápida de eixos, pistões e flanges a partir de especificações verbais
  • Aprendizado de convenções de projeto a partir de arquivos SolidWorks existentes
  • Automação de geração de scripts CAD com validação de parâmetros de engenharia

Veredito

Ferramenta altamente especializada para engenheiros mecânicos que trabalham com SolidWorks. Excelente em inferência de parâmetros usando regras de design e histórico de projetos, mas requer integração local com SolidWorks e curadoria da base de conhecimento em chinês para máximo potencial.

README

A tradução para o português deste README ainda está na fila.

solidworks-draw

An AI skill that drives SolidWorks to build parametric mechanical parts from natural language.

solidworks-draw lets an AI agent understand a mechanical design described in plain language (e.g. "draw a stepped transmission shaft, Ø30, 200 mm, with two keyways"), reason about the missing parameters using built-in engineering rules, confirm them with you, and then generate the SolidWorks Python API calls that build the model.

It is packaged as an Agent Skill (SKILL.md + supporting knowledge/templates/utilities) and works with Claude Code, Codex, and any agent runtime that loads skills from a skills directory.

Note on language: the skill prompt (SKILL.md) and engineering knowledge base are written in Chinese, and default to GB (Chinese national) standards. This README is the English introduction.


What it does

  1. Intent parsing — extracts part type, key dimensions, material, machining features, and tolerance requirements from a natural-language request.
  2. Triple knowledge retrieval — cross-checks three sources, in priority order:
    • Learned parts library (knowledge/learned_parts/) — parts extracted from your own SolidWorks files, so new designs stay consistent with your existing work.
    • Design rules (knowledge/design_rules.yaml) — empirical formulas and parameter relationships for shafts, pistons, flanges, gears, and general practice.
    • Material database (knowledge/material_db.yaml) — properties, applications, and heat-treatment notes for common engineering materials.
  3. Parameter inference — derives any unspecified parameters and explains the source of each (standard, learned part, or design rule).
  4. Confirmation — prints a full parameter table and waits for your approval before generating any code.
  5. Execution — calls the matching template to emit a complete SolidWorks Python script.
Natural language → intent parsing → triple knowledge retrieval → parameter inference → confirm → execute

Features

  • 🗣️ Natural-language modeling — describe the part, not the API.
  • 📐 Engineering-aware — built-in GB-standard design rules and a material database.
  • 🧠 Learns from your files — sw_extractor.py turns existing .sldprt files into a structured knowledge base; the more parts it learns, the closer its output matches your shop's conventions.
  • 🔍 Similarity search — finds the closest existing parts to use as a reference for a new design.
  • ✅ Confirm-before-build — never silently guesses; every derived value is justified.
  • 💾 Offline-safe — if SolidWorks is not installed, scripts emit a JSON description instead.

Supported parts

CategoryTemplateStatusTypical features
Shaft (transmission / stepped)templates/shaft.py✅ Implementedmulti-section cylinders, keyways, retaining-ring grooves, center holes, threads
Pistontemplates/piston.py✅ Implementedpiston body, ring grooves, pin bore, skirt, relief grooves
Flange—📋 Design rules onlydisc, bolt-hole pattern, center bore, seal groove
Gear—📋 Design rules onlytooth profile, hub, keyway, lightening holes

Flange and gear have engineering rules in design_rules.yaml but no code template yet — contributions welcome.


Repository layout

solidworks-draw/
├── SKILL.md                       ← skill prompt (Chinese) — the agent entry point
├── knowledge/
│   ├── design_rules.yaml          ← engineering design rules (shaft/piston/flange/gear/general)
│   ├── material_db.yaml           ← material properties (steels, stainless, cast iron, Al, Cu, plastics)
│   └── learned_parts/             ← parts learned from your SolidWorks files
│       ├── README.md
│       └── example_shaft_d30.json ← sample extraction result
├── templates/
│   ├── shaft.py                   ← shaft generator
│   └── piston.py                  ← piston generator
├── utils/
│   ├── sw_api.py                  ← SolidWorks COM API wrapper
│   ├── sw_extractor.py            ← extracts knowledge from .sldprt files
│   └── similarity.py              ← similar-part search engine
├── LICENSE
└── README.md

Requirements

  • SolidWorks installed on Windows (uses the SldWorks.Application COM API) — only needed to actually build/extract models; the skill can still reason and emit JSON without it.
  • Python 3.10+
  • pywin32 (for the COM bridge) when running against a live SolidWorks instance.

Installation

Place the solidworks-draw/ folder in your agent's skills directory, e.g.:

RuntimePath
Claude Code~/.claude/skills/solidworks-draw/
Codex~/.codex/skills/solidworks-draw/

The agent discovers the skill via SKILL.md and invokes it on prompts like "画一个…" / "draw a…" / "help me model…".


Usage

Build a part from natural language

Just ask the agent:

画一个直径30、长200的传动轴,两端各一个键槽 (Draw a Ø30 × 200 transmission shaft with a keyway at each end.)

The agent retrieves references, infers the missing parameters, shows a confirmation table, and on approval generates the SolidWorks script.

Teach it from your existing files (training mode)

# Extract knowledge from a single file
python utils/sw_extractor.py -i "D:/CAD/my_shaft.sldprt" -o knowledge/learned_parts/

# Or batch-extract an entire project
python utils/sw_extractor.py -i "D:/CAD/ProjectX/" -o knowledge/learned_parts/ --batch

# Search for similar reference parts
python utils/similarity.py --type shaft --dims diameter=30 length=200
Learned samplesBehavior
0Generic textbook design rules
5–10Learns your material preferences and size ranges
20–50Learns your company's design conventions
100+Closely matches your design habits; can flag anomalies

Privacy: this public repository contains only a sample part (example_shaft_d30.json). No proprietary/learned part data is included. Anything you extract into learned_parts/ stays local unless you choose to commit it.


Defaults

ItemDefault
Unitsmillimeters (mm)
Anglesdegrees (°)
StandardsGB (Chinese national standards)
Default material45 steel
Surface roughnessRa 3.2
Thread standardMetric M series (coarse)
Tolerance gradeIT7 (bearing fits), IT12 (non-mating)

Contributing & Community

Feedback and contributions are very welcome! If you'd like to discuss improvements, share design rules, contribute new part templates, or help optimize this skill, please use the project's built-in channels:

  • 💬 Discussions — questions, ideas, and general conversation about the skill.
  • 🐛 Issues — bug reports and concrete feature requests.
  • 🔀 Pull Requests — new templates (flange, gear, …), rule/material additions, and fixes.

License

MIT © 2026 SHY-563

Ver o original no GitHub

Bom para

Relacionados