CAD Editor
Paste the following prompt into your AI chat to install this skill:
Please refer to https://skillhub.cn/install/skillhub.md to install @user_e02e04b8/cad-editor.
About this skill
In engineering design practice, converting natural language descriptions into standardized CAD drawings often involves tedious manual drafting or complex API interactions, which is time-consuming and requires expertise in specific standards.
The Specific Problem Being Solved
Engineers, designers, or non-specialist drafters frequently encounter these pain points:
- The need to quickly translate verbal or written instructions (e.g., "draw a 4000x3000 architectural floor plan") into usable engineering drawings, but manual use of tools like AutoCAD is inefficient.
- Different industries (architecture, mechanical, electrical, piping, structural) have specific standards (e.g., GB/T), and manual drawing risks errors or non-compliance.
- The desire to generate drawings programmatically, but direct DXF API usage has a steep learning curve.
How the Skill Works
The CAD Editor skill's core functionality is to automatically convert natural language instructions into engineering drawings, covering five major domains and adhering to GB/T drafting standards. Its workflow involves several key steps:
Core Capabilities and Key Steps
- Natural Language Parsing: An NL parser uses 52 predefined intent templates from
references/intent_templates.jsonto identify user intent and extract parameters (e.g., dimensions, types). - Script Generation: Based on the intent, a script generator is invoked, with 18 built-in script templates categorized by domain:
- Architecture: Covers components like walls, doors, windows, columns, and stairs.
- Mechanical: Handles standard parts such as bolts, gears, bearings, and springs.
- Electrical: Generates symbols for switches, outlets, and lighting fixtures.
- Piping: Draws straight pipes, elbows, valves, and other pipeline elements.
- Structural: Produces detailed views of beam sections and slab reinforcement. - Execution and Rendering: Scripts execute to generate DXF files (a standard CAD exchange format) and automatically render preview images in PNG, SVG, or PDF formats.
- Result Delivery: Users receive preview images and DXF file paths directly, enabling further editing in software like AutoCAD or FreeCAD.
Direct API Calls
For programming scenarios, the skill provides a Python API, allowing bypassing NL parsing to call drawing functions directly, such as generate_architectural_plan(width=4000, height=3000) for precise control.
Applicable Boundaries and Considerations
- Domain Coverage: The skill focuses on predefined engineering domains and basic geometry; it is not suitable for freeform artistic drawing or highly customized components beyond templates.
- Standards Compliance: Output drawings strictly follow GB/T drafting standards (e.g., layer naming, color indexing); adapting to other international standards requires manual adjustments.
- Dependencies and Output: Relies on
ezdxf,matplotlib, andnumpylibraries for DXF operations and rendering; output primarily in DXF with preview images as supplementary, not for direct CAD entity editing. - Precision Limits: Template-based generation may not handle highly specialized components (e.g., non-standard mechanical parts), often requiring post-processing via direct API calls.
Use Cases
- An architect in early project stages needs to quickly generate a GB-compliant floor plan from client requirements (e.g., 4000x3000 room with doors and windows) for team review and preliminary design confirmation.
- A mechanical engineer designing assemblies uses natural language commands (e.g., M16 hexagon bolt head top view) to auto-generate standard part views for integration into technical documentation that meets industry standards.
- An electrical designer creating control system diagrams produces electrical symbols and circuit layouts by describing (e.g., single-pole switch symbol placed vertically) to ensure accuracy and compliance.
- A piping engineer planning HVAC systems inputs instructions (e.g., 90-degree elbow R100 DN50) to generate pipeline component schematics for construction document preparation and material list extraction.
Best For
- Architectural Designer: Needs to quickly convert design concepts into standard CAD drawings for client proposals and preliminary design reviews, reducing manual drafting time.
- Mechanical Draftsman: Generates standard mechanical part views (e.g., bolts, gears) to ensure drawings comply with GB/T drafting standards, avoiding manual drawing errors.
- Electrical Engineer: Uses natural language to rapidly create electrical symbols and circuit diagrams for integration into control system design documents, enhancing drawing generation efficiency.
- Structural Engineer: Produces structural details like beam sections and slab reinforcement for construction document delivery and compliance checks, ensuring adherence to building standards.
Related Skills
Systematically identify and evaluate the economic moats of listed companies using the Tang Shu Fang investment methodology for long-term investment analysis.
A skill that converts natural language questions into A-stock data queries and returns verifiable structured analysis conclusions, covering multi-dimensional analysis of market trends, fundamentals, and news.
An AI financial copilot by Wind, integrating financial databases and multimodal analysis to provide end-to-end support across investment research, asset allocation, risk control, quant, and report generation.
Searches for latest policies and generates GB/T 9704-2020 compliant official documents (requests or reports) in Word and PDF formats.