A FreeCAD plug in that integrates OpenAI's GPT-4 model to generate Python scripts for creating sketches & 3D models based on user input.
- Python
- Open AI API key
- Open a terminal or command prompt with administrator privileges.
- Clone this repository directly into the FreeCAD Mod folder:
git clone https://github.com/revhappy/GPT4FreeCAD
into:
C:\Program Files\FreeCAD 0.20\Mod
- Open a command prompt and navigate to the FreeCAD bin folder:
cd C:\Program Files\FreeCAD 0.20\bin
- Install the
requests
library:
python -m pip install requests
- Launch FreeCAD.
- Go to
Macro > Macros...
. - Navigate to the folder:
C:\Program Files\FreeCAD 0.20\Mod\GPT4FreeCAD
. - Click on
GPTSTART.FCMacro
and click "Execute" to run the macro.
- In FreeCAD, go to
Tools > Customize...
. - Click on the "Macros" tab.
- Follow the directions to add the macro to your toolbar.
Yes, the model can fail and present a blank screen or something random.
You can turn on Report View, I have it set up to show the python code along with any errors.
In case of failure, merely prompt 'try again' or copy and paste the error into the prompt screen.
These are early days, be patient :p
This project is licensed under the MIT License.
Copyright (c) 2023 Robb Sharma