I need help with my CAD AI please #202130
Replies: 1 comment
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
Body
FeatureScript CAD AI Generator Github : (https://github.com/noobifyLol/CAD_AI)
I have been wanting to make an AI for something for a while, and this was a project that was beyond my skill level but still wanted to do it. However, even with AI help, the generations keep failing or generating with error.
It was supposed to just generate Featurescript code that people can copy and paste, and it generates 3d models for them in Onshape CAD. It would also provide the user with the options to change the properties of the model after generation.
Current Structure
This is the current structure of the AI right now:
I am using the Groq models because I am not trying to start from scratch making an AI
I have multiple keys that my code will iterate through if it hits a token limit or encounters errors so it would keep generating. But also more like a pipeLine, I have some keys that do the generate of the FeatureScript itself and some for like debugging.
I also have a database that is storing responses for future references and learning
Then I have other parts of the code that just feeds the AI templates to base the FeatureScript off of and then it generates it.
But I don't know why it's still failing or is this impossible to do with a Free AI model I not sure that's why I'm reaching out for help. Also if you're going to look at the repo code, yeah it's messy and like I said I used mad AI for this project so it going to be super messy.
Main Problems
The main problems in this project are right now:
FeatureScript generation has errors so when you copy and paste the FeatureScript into Onshape, it wouldn't compile


The AI would write too little code, so the generation is very minimal
Some of the models that came from the FeatureScripts can't be revolved, basically saying there is nothing generated
I can't think of any more errors right now but those are the main 3.
Technical Context (What I found out + AI diagnose)
The compilation and truncation challenges facing this project are linked to how LLMs process information, highly strict programming syntaxes like FeatureScript. Because models optimized for speed on free inference layers (such as the Llama models on Groq) are trained heavily on mainstream open-source repositories like JavaScript, C++, and Python, they have a strong tendency to "hallucinate" familiar coding patterns. This causes them to inject illegal operators (such as ++ or --) or mistakenly treat arrays as standard JavaScript objects by evaluating .length instead of utilizing FeatureScript's mandatory size() syntax, resulting in immediate compilation failure in Onshape.
Additionally, creating a complete, parametric 3D model requires a heavy volume of verbose, step-by-step procedural geometry logic. When your architecture injects large base code templates directly into the system prompt, it drastically eats into the model's total token budget. Free-tier inference pipelines maintain tight limits on maximum output tokens. When the prompt is crowded with reference templates, the model quickly exhausts its generation headroom and gets abruptly truncated mid-sentence, leaving behind the minimal, incomplete code blocks you are encountering.
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions