cad-operations-skill

mcp
Security Audit
Pass
Health Pass
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 12 GitHub stars
Code Pass
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Multi-discipline CAD Agent Skill, 28-Tool MCP Server & Web Studio for Mechanical, Civil Bridge, Environmental WWTP & Electrical SLD drafting, surgical DXF/DWG revision, and tiered acceptance.

README.md

CAD Operations Skill

Mechanical, civil, environmental and electrical CAD drafting and revision

简体中文 · English · Quick Start ↓ · How to Launch Studio ↓

Mechanical Drafting cover: 3D drilling jig solid silhouette
⚙️ Mechanical Drafting
Draft part and assembly drawings, build watertight 3D models, and revise targets from comments.
See Flange Hole Revision ↓
Civil Engineering cover: Highway T-girder and crowned bridge deck cross-section
🌉 Civil Engineering
Run highway T-girder bridge checks & 22-sheet CAD albums, and draw layered road pavement sections.
See Bridge CAD Album ↓
Environmental Science cover: Adjacent WWTP treatment units, water line, and water-level elevation
💧 Environmental Science
Inspect the WWTP hydraulic & sludge elevation sample and see how process & piping sheets are built per project.
See WWTP Elevation Sheet ↓
Electrical Engineering cover: Busbar, main transformer, and downstream feeder branches
⚡ Electrical Engineering
Generate and verify substation main single-line diagrams from busbar and equipment schedules.
See Substation Main SLD ↓

Mechanical Drafting

Generate mechanical engineering drawings, build watertight 3D models, or revise targeted objects from project briefs, dimension tables, or existing baselines.

Capability What It Does
2D Part & Assembly Drawings Draft orthographic and sectioned views of flanges, shafts, gears, and fixtures with dimensions, technical notes, title blocks, and BOM tables.
3D Modeling & 2D Projection Export STEP, STL, and GLB solids plus projected 2D views from supported part parameters. Native SolidWorks files are rebuilt and saved via a local installation.
Surgical Local Revision Click or marquee-select targets to resize holes, chamfer/fillet corners, or move annotations, then inspect the Red/Green overlay diff and scope verification.

Mechanical revision result: right bolt hole resized from Φ12 to Φ16 with Red/Green overlay diff and measured verification
Result: Connecting Flange Single-Hole Resize (Φ12 → Φ16 mm) — Solid green marks the measured new hole, dashed red marks the prior contour, with 0 collateral edits across the other 5 holes and outer rim. See also 3D Jig Assembly, 2D Sectioned Assembly & CAM Toolpath.

  • Required Inputs: Part dimensions, required views, and tolerance rules; local revision also takes the current DXF baseline plus comments.
  • Deliverables: Editable part DXF, 3D STEP/GLB, 2D PNG/SVG previews, revised.dxf Red/Green diff, and acceptance-report.json.
▶ View the Φ12 → Φ16 Hole Revision Process (6–9s Animated GIF) · Open Full-Size Diff

Mechanical surgical revision animation: selecting the Φ12 hole, resizing to Φ16, and reading the live acceptance report

Next Steps Sample Input (project_brief.md) · 2D Drafting Guide · 3D & SolidWorks Guide · Revision Tools Guide


Civil Engineering

Covers highway T-girder bridges and road pavement structures from design parameters to multi-sheet CAD albums, calculation reports, and cross-section drawings.

Capability What It Does
Highway Bridge Analysis & Cross-Check Compute structural envelopes and 3D tendon checks from span and section inputs; compare item by item when independent Dr.Bridge/Midas FEM results are supplied.
Construction CAD Album & Thesis For the supported T-girder workflow, output 22 A3 CAD sheets, a bookmarked combined PDF, calculation book, Word report, and 300-DPI figures.
Road Pavement Cross-Sections Draw layered DXF cross-sections from road materials, layer thicknesses, and cross-slope with distinct hatching and actual thickness callouts.

Civil Engineering result: Sheet 05 standard T-girder deck cross-section with 2% bidirectional crown
Result: 4×25 m Precast PC T-Girder Standard Cross-Section (Sheet 05) — 5 C50 T-girders, 2% crowned deck pavement, and crash barriers synchronized across the 22-sheet A3 construction album.

  • Required Inputs: Bridge span, girder count, section, and pier/abutment pile lengths (optional FEM tables), or road width, cross-slope, and layer materials/thicknesses. Includes both a standalone 3×30m river-crossing T-girder spec (bridge_3x30m_spec.json) and the full 4×25m 22-sheet reference suite.
  • Deliverables: 22 A3 bridge DXF sheets, bookmarked combined PDF, Word report .docx, 300-DPI calculation figures, and pavement DXF.

[!WARNING]
Engineering Calculation Disclaimer: All bridge hydraulic, load-distribution, internal-force envelope, and ULS/SLS reinforcement checks generated by this repository are intended solely for educational demonstration, graduation thesis workflows, and preliminary cross-checking — never as a formal construction design basis. Production construction drawings must be independently verified and stamped by a licensed structural engineer using certified commercial FEM software (e.g., Midas Civil / Dr.Bridge).

▶ View the Sheet 03 → 05 → 15 Album Tour Process (Animated GIF & Full Album Samples) · Open Full-Size Cross-Section

Civil bridge album tour animation stepping through Sheet 03 Elevation, Sheet 05 Cross-Section, and Sheet 15 Pier

Sheet 03 General Elevation
Sheet 03 · General Elevation (1:400)
Sheet 09 3D Tendon Coordinates
Sheet 09 · 3D Tendon Coordinates
Sheet 15 Double-Column Pier
Sheet 15 · Double-Column Pier

300-DPI Calculation Figures Grid
Auto-Generated 300-DPI Thesis & Defense Figures (3-scheme comparison, M/V envelopes, effective prestress curve, and pile-soil profiles). Additional sheets: Sheet 19-1 Tie-Beam Joint & Web Studio Bridge Workbench.

Next Steps Standalone 3×30m Bridge Spec (bridge_3x30m_spec.json) · Pavement Sample Input (pavement_structure_spec.json) · Bridge Album Guide · Road Pavement Guide


Environmental Science

Focuses on wastewater treatment plants (WWTP) and water/sludge engineering: provides both a parametric A3 WWTP hydraulic & sludge elevation DXF generator (with automated gravity-flow backwater and 50-year flood checks) alongside the published sample sheet, while marking yard piping and tank plans as Custom by Project.

Capability What It Does
Hydraulic & Sludge Elevation Sheet · Sample Available + Parametric Generate layered A3 WWTP elevation DXF/PNG sheets from plant capacity, unit water levels, and receiving flood stage with backwater audits (wwtp_hydraulic_spec.json), or explore the published 1.3×10⁴ m³/d sample.
Process Flow Diagrams · Custom by Project Draft treatment sequences, flow directions, sludge lines, and recycle loops from confirmed unit and connection schedules.
Site Plans, Yard Piping & Unit Sections · Custom by Project Draft or revise yard piping networks and unit plans/sections from base drawings, manhole/pipe schedules, and confirmed tank dimensions.

Environmental Science sample sheet: 1.3×10⁴ m³/d WWTP hydraulic and sludge elevation layout
Published Sample & Parametric Sheet: WWTP Hydraulic & Sludge Elevation (Sample Available + Parametric DXF) — Coordinates bar screens, grit chamber, biological basins, filtration/UV disinfection, and sludge thickening/dewatering elevations on one sheet.

  • Required Inputs: Confirmed process sequence, unit IDs, and water/invert elevation tables (see examples/wwtp_hydraulic_spec.json); site yard piping and tank plans (Custom by Project) also require base drawings and manhole/pipe schedules.
  • Inspectable Sample & Deliverables: Parametric A3 WWTP elevation DXF/PNG + hydraulic head-loss audit report, guided Full WWTP Hydraulic Elevation Sheet tour, and local revision + tiered acceptance on existing water/wastewater DXF baselines.
▶ View the Main Water Line → Sludge Line → SBR Elevation Zoom Tour (6–9s Animated GIF) · Open Full-Size Elevation Sheet

Environmental WWTP elevation tour highlighting main water line, sludge line, and zoomed SBR design water levels

Next Steps Parametric WWTP Spec (wwtp_hydraulic_spec.json) · Open Full-Size WWTP Sample · Env Companion Skill · Local Revision Guide · Review & Environment Guide


Electrical Engineering

Demonstrates substation main single-line diagrams (SLD) from voltage levels, busbar schemes, main transformers, and feeder lists through drafting and verification.

Capability What It Does
Main SLD Generation Supports single-bus, sectionalized single-bus, and double-bus examples, laying out busbars, main transformers, and HV/LV feeder bays.
Equipment Symbols & Labels Draws and labels circuit breakers, disconnectors, voltage transformers, and capacitor banks complete with borders and title blocks.
Connectivity Check & Export Cross-checks feeder and transformer counts across voltage levels and exports DXF, PDF, and SVG while distinguishing automated count checks from visual junction/crossover review.

Electrical Engineering result: 110kV/35kV substation main single-line diagram
Result: 110kV/35kV Substation Main Single-Line Diagram — Generated directly from the JSON bay schedule with 2 two-winding main transformers, sectionalized 35kV busbar, HV/LV feeders, PTs, and shunt capacitor banks.

  • Required Inputs: Voltage levels, busbar arrangement, transformer count, and feeder/capacitor bay names and counts.
  • Deliverables: Editable layered DXF, printable vector PDF, lossless SVG, and audit_sld count verification report.
▶ View the Bay Schedule → SLD Generation & Junction Zoom Process (6–9s Animated GIF) · Open Full-Size SLD Sheet

Electrical substation SLD animation from bay schedule to full single-line diagram and magnified breaker/bus junction

Next Steps Sample Input (electrical_sld_spec.json) · Electrical Main SLD Guide


Shared Capabilities & Access

Uses a modular Router + 5 Discipline Companion Skills architecture for low-token progressive loading: cad-operations handles intent routing and safety guardrails, delegating domain specifics to cad-2d-geometry, cad-revision-and-acceptance, cad-civil-bridge-road, cad-electrical-sld, and cad-environmental-water.

Shared Capability Scope & Entrypoint
Unified Acceptance, Batch modify_where & Checkpoints Connects 3-bucket dimension provenance (user_specified / derived / system_assumed), conditional batch entity edits (modify_where), .cad-checkpoints atomic snapshots + oplog.jsonl, and tiered light / delivery sign-off into one report across CLI, MCP, and Studio. Acceptance Guide · 3 Public Regressions
Template Learning & Experience Reuse Extracts layers, lineweights, text heights, hole-callout habits, and Word 3-line table formatting from reference .dxf and .docx files into .cad-memory/, distinguishing single-drawing exceptions from project-wide preferences and promoting verified revision checks. Learning Guide · Local Review
CLI · Web Studio · 28-Tool MCP (--read-only / --compact-tools / Live Session) Supports --read-only zero-write audit mode, --allow-tool allowlists, --compact-tools progressive tool search (cad://tools/search?q=...), and active AutoCAD/ZWCAD/GstarCAD or watched-DXF live viewport snapshots (cad-skill live-session). Studio & MCP Guide · Command Examples · Local CAD Setup

Quick Start

CI Tests Release Tests Passed Python 3.11+ MCP 28 Tools MIT License
Supported Formats CAD Drivers

0. One-Line Skill Install or Zero-Clone uvx Run (Recommended)

# Install the router skill + 5 discipline companion skills into Claude Code / Cursor / Codex / Antigravity
npx skills add XiaoGuai23/cad-operations-skill

# Or run CLI / Web Studio directly without cloning via uvx (Python 3.11+)
uvx --from git+https://github.com/XiaoGuai23/cad-operations-skill cad-skill doctor --json
uvx --from git+https://github.com/XiaoGuai23/cad-operations-skill cad-skill mcp-http --port 8765

1. Local Editable Install & Reproduce Examples (Python 3.11+, No Manual PYTHONPATH)

macOS / Linux (bash / zsh)

git clone https://github.com/XiaoGuai23/cad-operations-skill.git
cd cad-operations-skill
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt -e ".[dev]"

# Run electrical/pavement/WWTP smoke checks & verify all 3 public regression counterexamples
python tests/smoke_test.py
python scripts/generate_wwtp_elevation.py examples/wwtp_hydraulic_spec.json --out output/wwtp
python examples/public-regressions/build_and_verify_cases.py --verify-only

Windows (PowerShell)

git clone https://github.com/XiaoGuai23/cad-operations-skill.git
cd cad-operations-skill
py -3.12 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt -e ".[dev]"

python tests/smoke_test.py
python scripts/generate_wwtp_elevation.py examples/wwtp_hydraulic_spec.json --out output/wwtp
python examples/public-regressions/build_and_verify_cases.py --verify-only

Launch Local Studio

# Works identically on macOS, Linux, and Windows after `pip install -e .`
cad-skill mcp-http --host 127.0.0.1 --port 8765 --workspace output/mcp_workspace

# Open http://127.0.0.1:8765/        -> 4-Zone Engineering Sample Catalog & Acceptance Portal (same as /showcase)
# Open http://127.0.0.1:8765/studio  -> Dedicated Interactive Marquee Revision, Layer & Drafting Workbench

Local 4-Zone Web Portal and Live Blueprint Layer HUD
Local 4-Zone Web Portal (/ & /showcase) and Drafting Studio (/studio) — Interactive layer toggles, marquee revision, Red/Green vector diff, and multi-discipline drafting forms.

Configure MCP

{
  "mcpServers": {
    "cad-operations": {
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/XiaoGuai23/cad-operations-skill",
        "cad-skill", "mcp-stdio",
        "--workspace", "./output/mcp_workspace"
      ]
    }
  }
}

If installed locally via pip install -e ., point "command" to .venv/bin/cad-skill (.venv\\Scripts\\cad-skill.exe on Windows). Pass --read-only for zero-write review mode or --compact-tools for progressive tool search.

🛠️ Expand: CLI Drafting, Checkpoints & Acceptance Cheatsheet
# 1) Compile mechanical brief (with 3-bucket dimension preflight) & learn .docx + .dxf styles
cad-skill compile-spec examples/project_brief.md --out output/drawing-spec.json --json
cad-skill learn-template --docx ref_thesis.docx --dxf ref_dxf_dir --out .cad-memory --json

# 2) Generate watertight 3D model (.step/.glb/.stl) + projected 2D sheet
cad-skill generate-3d model3d-spec.json --out output/part3d --with-2d-sheet --json

# 3) Substation SLD, road pavement, parametric WWTP elevation & standalone 3x30m bridge
python scripts/make_main_sld.py examples/electrical_sld_spec.json --outdir output/sld --stem demo_sld
python scripts/generate_pavement_cad_ezdxf.py examples/pavement_structure_spec.json --out output/pavement
python scripts/generate_wwtp_elevation.py examples/wwtp_hydraulic_spec.json --out output/wwtp
python scripts/run_bridge_suite.py --spec examples/bridge_3x30m_spec.json --out output/bridge_3x30m

# 4) Atomic checkpoints, live CAD viewport snapshot & unified tiered acceptance
cad-skill checkpoint create --dxf output/sld/demo_sld.dxf --label before-edit --json
cad-skill live-session --live-dxf output/sld/demo_sld.dxf --snapshot --out output/live_session --json
cad-skill acceptance output/sld/demo_sld.dxf --tier light --json

Get Hands-On: Reproduce Examples · Launch Studio · Configure MCP


License & Credits

Released under the MIT License. Originally evolved from 2836048681/cad-operations-skill; third-party notices for adapted ezdxf rendering utilities are documented in THIRD_PARTY_NOTICES.md. Native .dwg conversion and ACIS solid execution invoke locally installed, signature-verified CAD consoles and do not bundle proprietary CAD binaries or fonts.

Reviews (0)

No results found