Has anyone else tried prompting AI LLMs to automate code generation for scripts/Macros instead of using the GUI?
I am currently using Grok from X’s website (formerly Twitter) to teach me parametric part modeling via python scripting in FreeCAD’s built in python interpreter.
It has visual models built into it, so I can copy/paste before and after screenshots of the 3D viewer from each iteration along with prompting. This is about the closest you can get to text input to CAD output that I am aware aside of some very clunky plugins on blender and others.
This is not very streamlined as it is an iterative trial and error process. But for those who may be new to CAD (such as myself), it can be a good alternative to learn CAD given your using a software that uses a scripting language that you already know or is relatively easy to learn (and you don’t want to use the GUI ).
I think AI is about 25% useful and 75% BS so take this with a grain of salt. I’m learning FreeCAD myself but have previously and still sometimes use Fusion. I also like using OpenSCAD for creating models programmatically. I am a software dev and am fond of scripting so I can at least appreciate your desire to go that route.
If you’re just learning CAD from the beginning, I think learning via AI is a terrible idea. I think AI is a useful tool once you have a foundation of knowledge on a topic but starting there from the beginning will likely lead you astray. I think even if your ultimate goal is to use the python scripting within FreeCAD, I think it’s in your best interest to learn at least the basics from the UI first by following a tutorial made by a human.
I highly recommend the Mango Jelly tutorials on YouTube.
well i want to learn how to effectively model parts. as a beginner programmer I enjoy using the command line interface/terminal. weather i use the gui or the built in python console to learn how to model parts is really irrelevant to me. I will be fine with either i just enjoy programming.
You will fit in here perfectly. Weirdos are welcome. im a hardware . I paid extra for vetric vcare pro to hope to not do what you enjoy. I tear apart and rebuild so much. Some parts have personal names like ##%^% screw and *@×# slot and with my typing comand line is a no-go
I recently discovered mango jelly on YT, i will continue to follow his tutorials, thank you for the recommendation. I can do very basic and minimum designs as is, I have used Onshape in the past.
im in my junior year at Ole Miss pursuing a comp eng degree, i have two priorities; learn python (as my schedule requires it. Currently I only know C++ and some assembly lang.) and learn to effectively model parts in CAD software.
im taking a stab at it but anything past the basics and you’re doing more work than you would with the gui. so far ive only scripted macros for basic generations of geometries, sketches, shapes, and such.
my main attraction to the python route excluding the fact that i have to take a couple classes in it and that i enjoy programming, is i am drawn to the capability of being able to communicate with an AI agent to learn in a conversational manner, its very direct and --tutorialized-- opposed to replaying a video clip and then asking a forum bc i have questions on how to do something or not understanding entirely or attempting to find a video for something specific.
To me, the near instantaneous feedback is smoother than waiting on a chatroom or forum to reply back. I honestly think both of those things are the same process: consume some type of text or visual informative content>attempt to model>inquire via a chatroom/forum/AI tool> try again. although sometimes the AI hallucinates or hasn’t been trained on enough data (i suspect) to give me the right solutions.
I am reading the FreeCAD wiki docs and having conversation with AI LLMs to teach me both python and the most basic scripts for FreeCAD, I have found that the more in depth and detailed the part gets, the more tedious and inefficient the process becomes when going the modeling by programming route. I think that is the ceiling or bottleneck for this route.
learning to navigate the GUI is inevitable. I wish i could just plumb in a local model to the cad software or a chatbot there to answer questions directly that can read my screen and infer what im trying to do to and guide me until i dont need it anymore.
Personally haven’t tried FreeCad, yet. Have tried OpenScad, and found ChatGPT to be helpful with ramping up. Fusion 360 supports Python scripting too, and ChatGPT’s able to help with ramping up on their object model and APIs too. OnShape have a Restful API (and maybe other API endpoints and wrapper libraries), again, ChatGPT helped ramp up on that one as well.
Out of these options, I personally gravitate towards OpenScad for new small’sh projects. But always have some frustration that the language is functional and not legit imperative which makes some simple tasks not so simple.
There are certain kinds of models that I think lend themselves better to doing via code. Usually, when I use OpenSCAD, it’s for something fairly simple and usually has some kind of pattern to it. I personally don’t use OpenSCAD for anything complex. Note that you can use python in OpenSCAD as well. I think it comes with some basic support out of the box but there are other options. (I haven’t done much of anything python so I don’t know details.) But, I would expect there to be a similar line as to what is reasonable to script in FreeCAD.
I’ll also note that as a software dev, my Lowrider has spawned a collection of programming related projects. On the FluidNC side using a Jackpot, I’ve created themes and extensions (HTML/CSS/JavaScript), a wireless pendant (C++), and am working on adding support to the WLED app for fun lighting options (also C++). So, if CAD doesn’t end up scratching your coding itch, there are other things in this arena. This has been fun for me since it’s very different than what I do at my job.
Those are some interesting upgrades , I hadn’t even given that thought . That really peaks my interest. I want to be able to mill some 5mm 6061 aluminum plate To build a modular chassis and frame for a remote controlled FPV ground vehicle.
Judging from the threads I’ve read (and there is plenty in this forum) I’ll have to start with something more forgiving and work my way up to that material.