ParamCAD is a local parametric part generation project for SolidWorks. It turns structured inputs or Chinese natural-language requests into validated parameters, then drives SolidWorks to rebuild and save the final part.
The project is aimed at mechanical design workflows where similar parts need to be generated quickly, consistently, and with clear validation feedback.
- Supports
JSON,Excel, andWebinputs. - Validates template defaults, parameter ranges, and template-level rules.
- Supports an
LLM planningstep that converts Chinese descriptions into a structured proposal before generation. - Runs either
dry-runmode or real SolidWorks generation. - Produces part files, optional drawing output, macros, and execution logs.
Current templates:
flange_connector_platesheet_metal_covermotor_mount_bracket
The workflow is intentionally split into two stages:
- Parse input into structured parameters.
- Validate, confirm, and execute CAD generation.
For natural-language input, the system does not generate immediately. It first returns a proposal that may include:
- Template guess
- Parameter patch
- Default-filled values
- Items that still need confirmation
- Validation warnings or conflicts
This makes the LLM act as a planner, not a fully autonomous CAD agent.
The easiest way on Windows is to run 启动Web.bat. It will:
- Find Python
- Install missing dependencies
- Start the FastAPI server
- Open the browser at
http://127.0.0.1:8000
Manual install:
python -m pip install -r requirements.txtRun the web server manually:
python -m uvicorn app.api.main:app --host 127.0.0.1 --port 8000 --reloadCLI dry-run:
python -m app.main --input examples/default_motor.json --dry-runCLI real generation:
python -m app.main --input examples/default_motor.json- Select a template or describe the part in Chinese.
- Fill parameters manually, or ask the LLM to prepare a plan.
- Review the proposed values and confirmation items.
- Start generation and inspect the returned output path and log.
Main endpoints:
GET /Web UIGET /templatesTemplate definitions and capability infoPOST /llm/planNatural language to structured proposalPOST /generateRun dry-run or real generationPOST /open-pathOpen an output path in ExplorerGET /healthHealth check
If you already have your own upper-layer system, /llm/plan and /generate are the main integration points.
Default output root: output/
Typical artifacts:
output/parts/*.SLDPRToutput/parts/*.SLDDRWoutput/macros/*.swpoutput/logs/*.log.json
Generated files use incremental versioning to avoid overwriting older results.
app/
core/ Data models, template management, validation, capability metadata
services/ Parsing, LLM planning, macro generation, CAD execution, pipeline orchestration
api/ FastAPI entrypoints
static/
template_registry.json
template_bindings.json
model_templates/
web/
index.html
docs/
images/readme/
Key files:
app/services/llm_planner.pyapp/services/cad_executor.pyapp/core/validation.pystatic/template_registry.jsonstatic/template_bindings.jsonweb/index.html
- Windows 10 or 11
- Python 3.11+
- A nearby SolidWorks 2024 version for real generation
Dependencies are listed in requirements.txt. pywin32 is only needed when running real SolidWorks automation.
ParamCAD depends on local COM automation for SolidWorks, so behavior can be affected by the installed SolidWorks version, template quality, and local permission settings.
It is recommended to validate new templates or workflow changes with dry-run before switching to real CAD execution.

