This project demonstrates how to use OpenAI's GPT-3 API and PySldWrap to automate sketch creation in SolidWorks. The program listens to user commands through the microphone, generates text prompts using OpenAI, and creates a sketch based on the user's input using PySldWrap.
- SolidWorks 2021
- Python 3.8 or above
- OpenAI API Key
- PySldWrap
- Clone this repository to your local machine.
- Install the required packages using
pip install -r requirements.txt
. - Set up an OpenAI account and get an API key.
- Update the
config.ini
file with your OpenAI API key. - Add the path to your local PySldWrap directory in the
PYTHONPATH
environment variable.
- Open SolidWorks before running the program.
- Run the program using
python solidworks_sketch.py
. - The program will listen to your command through the microphone.
- Once the program recognizes a valid command, it will generate a text prompt using OpenAI's GPT-3 API.
- Based on your input, the program will create a sketch using PySldWrap in SolidWorks.
- Follow the instructions displayed on the console to complete the sketch.
- Once the sketch is complete, it will be saved to the location specified by the user.
- Draw a rectangle
- Draw a circle
This project is licensed under the MIT License. See LICENSE for more information.