Skip to content

Python-based CAD generation tool that converts natural-language text prompts into fully parametric 3D CAD models. the project supports common engineering primitives (cubes, cylinders, plates, spheres, tubes)

License

Notifications You must be signed in to change notification settings

jdkhbots/Text-to-CAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Text-to-CAD

Python-based CAD generation tool that converts natural-language text prompts into fully parametric 3D CAD models. the project supports common engineering primitives (cubes, cylinders, plates, spheres, tubes) assigning sensible default dimensions, and exporting models in STL and STEP formats.

Description:

The AI CAD Generator is a Python-based project that leverages CadQuery to produce 3D models from text prompts without relying on cloud APIs. The system uses offline AI techniques for intent detection and parameter parsing, allowing users to generate CAD models of engineering primitives using natural language. The backend is modular, enabling future expansion to complex mechanical parts such as bolts, threads, and assemblies.

A Jupyter Notebook interface provides a user-friendly frontend with a text input box, generate button, and options to download STL and STEP files, making the tool accessible even for beginners.

Key Features:

Generate parametric 3D CAD models from natural-language prompts.

Offline AI for shape classification and parameter extraction (no API key required).

Supports cubes, cylinders, spheres, plates, and tubes.

Automatic default dimensions and geometry validation.

Export models to STL and STEP formats.

Modular architecture for easy extension to more complex shapes.

Jupyter Notebook user interface with text input and download buttons.

Future Improvements:

Expanded Shape Library: Add support for bolts, threads, cones, and more complex mechanical parts.

Advanced AI Parsing: Improve prompt understanding using offline ML models for more natural prompts.

User Interface Enhancements: Add progress indicators, interactive sliders, and visual previews.

Web Deployment: Convert to Streamlit or Gradio web app for easier online usage.

Performance Optimization: Ensure fast generation for large or complex models.

Challenges:

Designing an intuitive frontend for non-technical users.

Handling ambiguous or incomplete prompts with sensible defaults.

Ensuring offline AI parsing is accurate for a wide variety of user inputs.

Walkthrough

The notebook interface before generating a model:

AI CAD Generator UI



User enters a text prompt, e.g., 'tube outer 30 inner 26 height 60', then clicks generate:

Text-to-CAD Prompt

After generating, user can download STL or STEP files.



User could also enter a prompt e.g., 'A cylinder with height 20mm.' The module suggest default dimensions for the diameter:

Cylinder, default diameter



Note: The project is fully offline, and users can safely experiment with their own prompts and parameters to generate CAD models.

About

Python-based CAD generation tool that converts natural-language text prompts into fully parametric 3D CAD models. the project supports common engineering primitives (cubes, cylinders, plates, spheres, tubes)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published