Using ChatGPT with OpenSCAD

UKworkshop.co.uk

Help Support UKworkshop.co.uk:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Joined
20 Apr 2024
Messages
9
Reaction score
4
Hi,
My first post on here. I'm finding the forum and information on UK Workshop very entertaining and useful, so thanks to all.

I'm dipping my toe into the 3D printing arena as a complete beginner, as I need to make a housing for a hedgehog RFID chip tracker device I'm working on.
A friend put me onto OpenSCAD, which as a former programmer I found to be a comfortable environment for me (and it's free of course!)

This object is very far from complete, but after two days practising with OpenSCAD I feel I am actually getting somewhere...
The radial cylinders you see are going to be removed using the "difference()" command leaving drilled holes to poke the wires through.
I find it easier to envisage these when rendered positively to start with, and removed later.
Don't worry, the detail is not important right now - I might post the finished device when done.

1720940885900.png


Anyway, I've also been messing with ChatGPT and have also found that to be incredible for certain tasks.
I soon got to wondering if ChatGPT was familiar with OpenSCAD. I asked it, and it claimed that it was.
The obvious next move was to cut my OpenSCAD learning curve and ask ChatGPT to generate my object for me.
After all my end goal is not to become an OpenSCAD expert but simply to generate a design that I can use to print my object in the shortest possible time.

This is what it came up with after a couple of iterations...

1720941736781.png


Clearly, more work is needed!!
But I do have a serious question: Has any one tried to use the combination of OpenSCAD and ChatGPT with any success?
I'd be interested to hear your experiences.

All the best

John
 
I'm dipping my toe into the 3D printing arena
Welcome to the club !

But I do have a serious question: Has any one tried to use the combination of OpenSCAD and ChatGPT with any success?
I'd be interested to hear your experiences.

I have not tried an LLM with OpenSCAD personally because others tried that before me and also because I am reasonably familiar with how these systems answer programming questions for minor languages that do not have a large public codebase (i.e. extremely limited training data) – it is a waste of time.

In addition to large training data - CAD model generation requires a precise understanding of the 3D modeling context, which LLMs may not fully grasp. This can lead to errors in spatial reasoning and geometry generation.

I have seen experiments with Image generating LLMs - those have better success in generating mesh/stl files for organic models. But anything functional/precise - forget about it.

Language models aside - the best way to get better at any CAD (including OpenSCAD) is to practice, practice, practice, and practice again.

Pick your CAD, stick with it (don’t hop between different systems), and try to make everything with it. The key (at least for me) was to reduce the time span between my CAD sessions.


Here is ChatGPT idea of a unicorn
 
Sounds like a fascinating project. The hedgehog tracking not the CAD 😀

Very interesting that ChatGPT even got as far as it did and that certainly opens the question of the CAD providers going down this route in the future. They have the tracing data to make it possible and not having to invest a massive amount of time in to learning a CAD system has a lot of appeal. Though this is undoubtedly would be seen as a case of AI taking our jobs but I fact it is actually making the job more accessible.
 
Welcome to the club !



I have not tried an LLM with OpenSCAD personally because others tried that before me and also because I am reasonably familiar with how these systems answer programming questions for minor languages that do not have a large public codebase (i.e. extremely limited training data) – it is a waste of time.

In addition to large training data - CAD model generation requires a precise understanding of the 3D modeling context, which LLMs may not fully grasp. This can lead to errors in spatial reasoning and geometry generation.

I have seen experiments with Image generating LLMs - those have better success in generating mesh/stl files for organic models. But anything functional/precise - forget about it.

Language models aside - the best way to get better at any CAD (including OpenSCAD) is to practice, practice, practice, and practice again.

Pick your CAD, stick with it (don’t hop between different systems), and try to make everything with it. The key (at least for me) was to reduce the time span between my CAD sessions.


Here is ChatGPT idea of a unicorn

Thanks!
That's very interesting, thanks for the advice... and I liked the unicorn video! So far, the most success I have had with ChatGPT is the generation of artwork. Having been last in the queue when the creative genes were being dished out, it comes up with far better pictures than I ever could and in a fraction of the time.

I can feel myself being slowly dragged into the 3D printing arena - just need to convince the wife that I have a viable use case to buy a printer...

All the best.
John
 
Sounds like a fascinating project. The hedgehog tracking not the CAD 😀

Very interesting that ChatGPT even got as far as it did and that certainly opens the question of the CAD providers going down this route in the future. They have the tracing data to make it possible and not having to invest a massive amount of time in to learning a CAD system has a lot of appeal. Though this is undoubtedly would be seen as a case of AI taking our jobs but I fact it is actually making the job more accessible.
Thanks for your comment Paul!
It is a fascinating project - I belong to a Men's Shed and we are "helping" a Hedgehog Rescue to track their hogs. Keeps me occupied in retirement!
For those writing off AI, I think we are going to see big improvements in the next couple of years.
 
@John Duffy My advice, for what it's worth, is buy one. 😁😁 When I bought one in about 2014 a very good engineer friend asked "what on earth would I want that for? " My 'new' partner didn't see what it could ever be used for when I told her I had one (I was single when I bought it). Both thought it was going to be a flash in the pan and a total waste of money. However now my partner has seen just how many things I have made for the home and workshop and bits I have printed to mend various broken objects she understands why I have a printer. Some things are quite simple others complex.
Go on. Buy one!
Have fun
Martin
 
Hi Martin,
Thanks for your reply...
I was using a Prusa XL at our Maker Space today.
We made an auxiliary part (just a simple annulus) in about 1.5 hours. These things appear not to be very fast!
Unfortunately the estimated time for printing my more complex part as per the sketch was somewhere between 8 and 11 hours!
We're not there long enough. I'm going to streamline the design a bit ;)
So, the question that raises its head now is: what make and model of 3D printer to buy?
Cheers
John
 
Hi Martin,
Thanks for your reply...
I was using a Prusa XL at our Maker Space today.
We made an auxiliary part (just a simple annulus) in about 1.5 hours. These things appear not to be very fast!
Unfortunately the estimated time for printing my more complex part as per the sketch was somewhere between 8 and 11 hours!
We're not there long enough. I'm going to streamline the design a bit ;)
So, the question that raises its head now is: what make and model of 3D printer to buy?
Cheers
John
Bambu is pretty much the best available for the price today. Needs very little maintenance, works right out of the box and is fast for single colour prints. Also supports the majority of filaments in general use. My daughter bought one a while back and the print quality is excellent. She has the AMS add on which supports multi colour/material printing. I will be getting one to replace my very old printer later this year.
 
Bambu is pretty much the best available for the price today. Needs very little maintenance, works right out of the box and is fast for single colour prints. Also supports the majority of filaments in general use. My daughter bought one a while back and the print quality is excellent. She has the AMS add on which supports multi colour/material printing. I will be getting one to replace my very old printer later this year.
Thanks Paul,
I'll take a look at those!
John
 
I've been considering replacing my ancient Robox printer now about 10 years old. It was very much ahead of its time: self levelling and worked straight out of the box. It's a real shame they didn't take off better. I don't know why. Price perhaps? Mine was £1500 in 2014!
I've been thinking about the Bambu but haven't my round tuit yet.
 
The tweaks this chap proposes allows prints to be produced in a much shorter time than the using the standard print profiles. I have a Prusa Mini and I have created a print profile based on his recommendations and I'll always use it for an initial print. If needed, for the final print, I'll use a profile that produces a better quality or higher infill amount, but if you follow his advice, then the difference in print time is amazing.

 
For CAD and AI have a look at NX, student version allows you to play with it, although I think it watermarks output. You could then look at with NXopen and Chatpgpt.

Things like this are interesting when you link through to PLM, slightly off topic, apologies.
 
Interesting, I never though about using LLM to generate a design like this.

Seen plenty of people using it to generate images for lasers and CNC with some fantastic results particularly with fibre laser.
 

Latest posts

Back
Top