wzyn20051216/solidworks-automation-skill

Python automation toolkit for SolidWorks API

What it solves

This project provides a comprehensive automation framework for SolidWorks and AutoCAD, allowing users to control CAD software via Python or AI agents. It bridges the gap between natural language requirements and precise 3D modeling, assembly, and engineering analysis, while also providing a "headless" backend for users who do not have the CAD software installed.

How it works

The system operates through several entry points:

  • COM Automation: Uses Python libraries (pywin32, comtypes) to control the local SolidWorks/AutoCAD instance via ActiveX/COM.
  • Headless Backend: Utilizes OCCT/OCP for writing open formats (STEP, IGES, BREP, STL, etc.) when native CAD software is absent.
  • MCP Server: Implements a Model Context Protocol (MCP) server that exposes CAD tools to AI clients like Claude, Cursor, and Windsurf.
  • VibeCAD: A parametric planning layer that converts natural language into design plans and manufacturing rule checks.
  • Simulation: Integrates CalculiX for linear static and non-linear FEA simulation.

Who it’s for

  • Mechanical Engineers: Who want to automate repetitive modeling tasks or generate parts from scripts.
  • AI Agent Developers: Who want to give LLMs the ability to create and export real 3D CAD files.
  • CAD Users: Who need a way to perform DFM (Design for Manufacturing) checks or FEA simulations via a programmatic interface.

Highlights

  • Multi-Client Support: Integrates with Codex, Claude Code, Gemini CLI, and OpenClaw.
  • Hybrid Backend: Supports both native SolidWorks/AutoCAD control and open-format writing via OCCT.
  • Self-Review System: Automatically generates multi-view previews and JSON reports to help AI agents verify if the model matches the intent.
  • Extensive Toolset: Covers part modeling, assembly mates, motion studies, engineering drawings, and DFM risk checks.
  • VBA Guard: Includes a protection layer (sw_macro_guard.py) to validate and format VBA macros generated by LLMs before execution.

Related

  • Project
  • Project
  • Project
  • Project
  • Project