Development and testing¶
Testing¶
The server suite uses Flask's test client and a mocked LLM client, including revision, document-context, and auto-repair cases. The client has a dependency-free runner that checks the validator, request serialization (revision tree, context), the shared workflow, history counting, and modeling sequencing; the GitHub Actions workflows cover the build and both test suites; the installer is built locally with build_installer.ps1.
cd server
pip install -r requirements.txt -r requirements-dev.txt
pytest
pip-audit -r requirements.txt
msbuild client\tests\Vulcan.Client.Tests\Vulcan.Client.Tests.csproj /p:Configuration=Release /p:Platform=x64
client\tests\Vulcan.Client.Tests\bin\x64\Release\Vulcan.Client.Tests.exe
An optional SolidWorks smoke run exercises the real modeler, including document-context capture, mid-plane and two-sided geometry, selective edge filters, offset planes, dimension editing, freeform sketches, standard holes, dimension-driven configurations, drawing views, sheet metal base flanges, runtime verification with snapshots, and one-step rollback. It requires SolidWorks 2025 on the machine, closes the documents it creates, and restores the prompt preferences it changes:
msbuild tools\SolidWorksVerify\SwVerify.csproj /p:Configuration=Release /p:Platform=x64
tools\SolidWorksVerify\bin\SwVerify.exe
Pass --capture <dir> to save one SolidWorks screenshot per scenario. The current suite covers 33 scenarios, including the new drawing view and sheet metal base flange. The deterministic demo LLM and media helpers reproduce the README media without an API key:
python tools\demo_llm.py --port 5055
set QINIU_API_KEY=demo
set QINIU_BASE_URL=http://127.0.0.1:5055/v1
set QINIU_MODEL=vulcan-demo
python server\app.py
python tools\build_feature_gifs.py --captures <capture-dir> --out docs\assets
tools\UiShot\bin\Debug\net48\UiShot.exe <ui-frames-dir> docs\assets
Project structure¶
Vulcan/
├── README.md # English (default)
├── README.zh-CN.md # 简体中文
├── README.fr.md # Français
├── SECURITY.md # Security policy and key rotation
├── pyproject.toml # Ruff, Black, and mypy configuration
├── client/ # Active C# / WPF client
│ ├── Vulcan.SolidWorksClient/
│ │ ├── Core/ # SwAddIn — COM registration and lifecycle
│ │ ├── Models/ # ModelData, DocumentContext — request/response types
│ │ ├── Services/ # ApiClient, ModelingWorkflow, SwModeler partials,
│ │ │ # ModelingEngine, RunHistory, VulcanStatus, validator
│ │ ├── UI/ # MainWindow, task pane, Settings, Preview, History, Status
│ │ ├── icons/ # Brand icons and command icon strips
│ │ ├── ReferenceDLL/ # SolidWorks interop assemblies
│ │ ├── Vulcan Setup/ # Inno Setup installer
│ │ ├── packaging/ # install/uninstall scripts
│ │ └── build_installer.ps1 # Stages dist and builds the installer
│ └── tests/Vulcan.Client.Tests/ # Dependency-free validator, workflow, request, history runner (CI)
├── server/ # Active Flask server
│ ├── app.py # Flask routes, access control, SSE framing
│ ├── config.py # Environment configuration
│ ├── .env.example # Provider, auth, and server template
│ ├── Dockerfile # python:3.11-slim + gunicorn image
│ ├── prompts/ # Versioned zh/en/fr prompts
│ ├── services/ # Generation, request parsing, LLM client, feature validator
│ ├── tests/ # pytest suite
│ └── utils/ # Logging, rate limiting, exceptions
├── archive/ # Historical code kept for reference
│ └── beta/ # Legacy code-generation track
│ ├── client-csharp-beta/ # Early command-group / ribbon prototype
│ ├── client-python-beta/ # PyQt5 client with exec() execution
│ └── server-python-beta/ # FastAPI + AsyncOpenAI server
├── docs/
│ ├── en/ zh/ fr/ # Guides per language (MkDocs Material site)
│ └── assets/ # Shared figures, screenshots, and GIFs for the three READMEs
├── overrides/ # Theme overrides for share metadata
├── mkdocs.yml # Docs site: languages, navigation, mike versions
├── scripts/ # Maintenance scripts
└── tools/ # SolidWorksVerify and demo-media tooling
Repository notes. The maintained client lives in client/Vulcan.SolidWorksClient; Core/SwAddIn.cs handles COM registration and command wiring. The beta track is archived under archive/beta/ and is not maintained. Build artifacts, logs, .env files, and the installer payload are ignored by git.
Compatibility and current scope¶
| Area | Status |
|---|---|
| SolidWorks | Built and tested against SolidWorks 2025 (FeatureExtrusion3, FeatureCut4, FeatureRevolve, FeatureFillet3, InsertFeatureChamfer). Older releases may need parameter updates or the UI fallback; they are not part of the tested matrix. |
| Client platform | Windows only, x64, .NET Framework 4.8. |
| Server platform | Python 3.10–3.11; local, Docker, or headless. |
| Feature types | extrude, cut, revolve, fillet, chamfer, linear_pattern, circular_pattern, mirror, shell, draft, sweep, loft, rib, counterbore, countersink, hole_array, sketch, note, insert_component, drawing_view, base_flange, and edit_dimension are implemented; configurations adds dimension-driven part families. |
| Planes | The modeler routes front, top, and right datum planes and resolves Chinese, English, and French plane names. |
| Validation | The server checks the envelope and validates feature parameters; envelope deserialization and field defaults live in the C# client. |
| Authentication | Optional bearer token (VULCAN_API_TOKEN) and per-IP rate limiting. TLS and user accounts still belong in a reverse proxy. |
| LLM quality | Latency and correctness depend on the provider. Use a strong instruction-following model. |