OpenAI in Fusion 360?

OpenAI in Fusion 360?

coultrupdesigns
Observer Observer
4,759 Views
8 Replies
Message 1 of 9

OpenAI in Fusion 360?

coultrupdesigns
Observer
Observer

Hey guys, apologies if this topic exists in another thread but here goes:

 

*disclaimer* - I am by no means a F360 or OpenAI expert so again apologies for any mixed terminology.

 

We've all seen the "hype" around ChatGPT etc etc but I'm curious about using the OpenAI infrastructure/API to generate CAD. There's an example here of integration to Fusion 360 but it obviously has a ways to go before it's effective. In personal experience, I've experimented by asking ChatGPT to write code for OpenSCAD, then copy/pasted that to OpenSCAD, then exported to F360 to more modification... and I'll be honest it's had mixed results but it kind of works.

 

Does Autodesk have any developers working to create a "fork" of OpenAI/ChatGPT and make a legitimate integration to Fusion 360? I'm envisioning a chat-like feature where designer would communicate what they desire (hopefully in professional terms, not as a layman!) and follow up with modifications.

 

If this is already a feature or in development, great! If not... might be time to start thinking about it. I can't be the first person in this community with this vision.

 

Have a great day.

Grant

0 Likes
4,760 Views
8 Replies
Replies (8)
Message 2 of 9

sent-hil
Participant
Participant

Hi Grant,

 

For the past two days, I have been trying to write a script that copies over a base model to a new file and then updates some user parameters in the script. This is for my side business ToolWall to help manage the holder files.

 

I tried using ChatGPT to help me code it, but the results were very mixed. It gave me some interesting output back, but unfortunately, many of the API commands it used were incorrect. I'm not sure if Fusion did a major API rewrite since ChatGPT was trained on its last model or ChatGPT was just hallucinating.

 

For example, I asked ChatGPT how do I undo and it gave me this output:

timeline = app.activeDocument.timeline
if timeline.isUndoPossible:
	timeline.undo()
else:
	print("Cannot undo")

It looks correct at first glance, but it doesn’t work. Again not sure if this was old API or ChatGPT was just making it up.

 

I don’t know how I got to the correct version, either with Google or through the Forums. But this is the right command:

cmd = ui.commandDefinitions.itemById('UndoCommand')
cmd.execute()

 

I wish I could show some examples, but it seems ChatGPT history is currently unavailable. At the moment, I wouldn't trust ChatGPT to do anything important. The one place ChatGPT was useful was helping me write Python code. Things like how to I run the undo command 5 times, how to iterate over dictionary etc.

 

It’s very interesting you mention ChatGPT and OpenSCAD integration, do you have any public examples of it?

 

Would love to chat more if you’re interested.

 

Thanks,

Senthil

ToolWall

0 Likes
Message 3 of 9

kandennti
Mentor
Mentor

Hi @coultrupdesigns .

 

The person who wrote that article is someone who has not worked much on the Fusion360 API.
In Excel, it is possible to record actual operations as macros, but Fusion360 does not have such a feature, so I think it is of use for beginners to work on it.


My personal expectation for AI is that it would be helpful to realize similarity search of 3D shapes.
When I asked an operator at a CAD software distributor about this, he replied, "There are individual CAD software packages that have a similarity search function, but there is no software that can search for files such as Step in a similar way."


In the case of Fusion360, I think it would be a great asset to have a similar search function for geometry since the data is in the cloud.

Message 4 of 9

kandennti
Mentor
Mentor

I use CATIA V5 in my work, so I tried to have a CATIA macro created in chatGPT as a test.

 

The result was not good at all. There was a possibility that I could create something that worked if I let chatGPT modify it many times, but it became a hassle and I stopped halfway through.

 

In the case of CATIA, it is possible to record operations with macros, so there is really no need to have chatGPT create them.

0 Likes
Message 5 of 9

tomas.bangoA2EPZ
Advocate
Advocate
I think the current (solid,surface etc) creation features of the various CAD tools provide a much better way to define the shape being created than plain words. To create a shape more complex already, the given prompt would have to be very complex with very little room for error, in my opinion 
Message 6 of 9

dahliamartins
Observer
Observer

Hey there! It's interesting to hear about your experiments with ChatGPT and CAD software. As far as I know, Autodesk hasn't announced any plans for integrating ChatGPT into Fusion 360, but it's definitely a possibility in the future. If you're looking for ChatGPT integration services, there are companies out there that specialize in that sort of thing. It might be worth checking them out to see if they can help you achieve your vision. Best of luck!

Message 7 of 9

patrickCCA97
Contributor
Contributor

I'm sure Autodesk is on this...
There are great demos of OpenAI being used successfully with Blender.

The step needed is to feed OpenAI more about Fusion 360. If these are not sufficiently easily accessible on the web (behind auth and paywalls) then the model can't be trained very well. Open Source will conquer in that realms as all the code, docs, tutorials, etc. tend to be very available to train the models. But you can train it with your own data as well. The input tokens (your secrets + your question) can lead to limitations.

I'm a F360 hobby user, but my consulting company does work in this space.
I'm excited to see what Autodesk does next, or ya know reach out if you need help. 😉

Message 8 of 9

patrickCCA97
Contributor
Contributor

I have been playing around with ChatGPT3.5 at first and then ChatGPT4.

"Write a Fusion 360 script in Python to create a diesel fuel tank that is 40 inches x 12 inches x 6 inches with 0.125 inch thick walls."
This is the last prompt I just used with GP4 and it was quite good (see below).

Both "hallucinate a bit" in that they make up methods that don't exist (but they sound right). But upon prompting they improved. Originally in GPT3.5 I said use the Fusion 360 API and it hallucinated a fusion-360 library, telling me to pip install it first. I then corrected it about the Scripting tools and it never did that again.
GPT3.5 never successfully made the tank after a LOT of re-explanation.

GPT4 made the tank after one correction, It made up something resulting in an error.
"AttributeError: module 'adsk.core' has no attribute 'Rectangle3D'"

But then I told it about the error and to use Shell and it got it right.
I have actually _never_ used Fusion 360 scripting, but as someone who is a consultant in the software world, this approach is super compelling. Also, I think my assumption about the model just not having enough quality data to use is correct. I've used ChatGPT3.5 to write other Python scripts and it was very good and the only iteration was to add features to the script or to clarify my asks.

Attached is the script GPT4 created for fun.

0 Likes
Message 9 of 9

sassastatuscheck6
Community Visitor
Community Visitor

I a'm also trying to make script for my PHP tool. Can someone help me to devel api for my social grant status check tool. I have some model to show on my portfolio on my page

0 Likes