Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Best Of
Re: Trouble with loft not lofting
if you check "connections" you'll see more of what it's trying to do. (and how that's not going to make proper geometry.)
you can even match connections and get it working (I doupt whether this what you're trying to achieve):
but it would be better to keep you outline as simple and clean as possible, and add details further down the model like this (see V2)
(I have no idea what shape you're trying to achieve, I'm just guessing here).
New Custom Feature: Slot
I'm sure there are plenty of slot custom features out there. Well, here's another one. Creates straight or arc slots with counterbores, chamfers and works with sheet metal.
Re: Improvements to Onshape - December 13th, 2024
Really nice update! 2024 was a great year and I'm also looking forward to 2025😀
Happy Holidays to PTC and Onshape🎄🌟🎁
But I can't shake the feeling that something has been forgotten:
Re: Improvements to Onshape - December 13th, 2024
Enjoy the holidays, PTC and Onshape! so ready for the 2025 launch! 🎉
[Chatbot Copilot] - We Built a FeatureScript AI Assistant That Outperforms ChatGPT
Hey everyone,
I’m a mechanical engineer, and I’ve been working with FeatureScript at my company for about a year now. Honestly, it’s been tough. Tools like ChatGPT suck at FeatureScript, which is frustrating when you know how useful they are for more familiar languages like JavaScript or Python. Unless you're a FeatureScript expert, I think we can all agree that productivity takes a big hit compared to more common languages because there’s no good LLM-powered copilot to help out.
So, we fixed that ! We built our own AI assistant, specifically for FeatureScript !
It’s not perfect, but it’s way better than ChatGPT in this area. This isn’t just a basic GPT model with the Onshape Standard Library as input—two of our machine learning engineers spent six months building it. They used a technique based on a paper called “Large language model multi-agent collaborations”. I’m no, expert but basically, they created a system with reasoning steps, multiple agents working together to analyze questions, generate code, cross-check the documentation, test, and iterate until the output works. It uses RAG, agent-based reasoning, and multiple LLM calls to get the job done. Internally, it’s been a game-changer for how we work with FeatureScript. And while this tool clearly doesn't make us better than a featurescript expert, it does make us infinitely more productive.
Don’t get me wrong, if we had 10 million dollars to label tons of FeatureScript data and fine-tune a big model, that would be even better. But for now, this approach is giving us a really good productivity boost, and we’re pretty excited about it.
Now we’re wondering if we should share this with the outside world. There are a couple of big questions:
- Would people pay for it? Let’s be real: running all these models and doing this whole chain-of-thought process isn’t cheap. Plus, they put so much work into this. They’d have to charge a monthly fee. For professional work, it’s a no-brainer—just a small productivity boost pays for itself almost immediately. But do you feel the same way?
- Is there enough interest out there? Are we looking at a niche tool that only a handful of people would find useful, or is there a real market for something like this?
I’d love to hear what you think. Would a specialized FeatureScript assistant be worth the cost to you or your company? Are we barking up the wrong tree, or does this seem like something that could fill a real need?
Thanks for any thoughts you can share !
Re: FeatureScript Editing Logic: Array Indices Not Updating Properly
it's the parameter "isCreating is boolean"
Thanks to allI 🙏
leave code for newbies.
"Basic structure for array numbering"
import(path : "onshape/std/geometry.fs", version : "1511.0"); annotation { "Feature Type Name" : "Base Array Numbering", "Editing Logic Function" : "showLogic" } export const baseArrayNumbering = defineFeature(function(context is Context, id is Id, definition is map) precondition { annotation { "Name" : "Select Items", "Item name" : "Item", "Item label template" : "Index: #arrayPointIndex" } definition.myVariables is array; for (var variable in definition.myVariables) { annotation { "Name" : "Array Point Index", "UIHint" : UIHint.ALWAYS_HIDDEN } isInteger(variable.arrayPointIndex, POSITIVE_COUNT_BOUNDS); } } { println("My element definition" ~ definition); }); export function showLogic(context is Context, id is Id, oldDefinition is map, definition is map,isCreating is boolean) returns map { println("Number of items counted in showLogic: " ~ size(definition.myVariables)); for (var i = 0; i < size(definition.myVariables); i += 1) { definition.myVariables[i].arrayPointIndex = i + 1; println("Inside function, currentIndex is: " ~ definition.myVariables[i].arrayPointIndex); } return definition; }

Re: FeatureScript Editing Logic: Array Indices Not Updating Properly
I suggest reading the documentation on editing logic. Some useful stuff in there.
if the "isCreating" parameter is omitted, then the editing logic function only runs during creation.
Re: How do I change what I have currently into this wheel ?
The learning center might be a good place to start.
You could sketch the profile of the cut and use revolve/ remove to spin it around your axis.
Re: [Chatbot Copilot] - We Built a FeatureScript AI Assistant That Outperforms ChatGPT
It's definitely interesting, and feels like an inevitable thing that will exist. I think I share Simon's feelings though. If it really worked it would be valuable. Even more so if it could get Onshape users from non-FeatureScript users to FeatureScript users. That initial learning curve is steep (or was for me anyway). I also use Grasshopper from time to time, and agree that some kind of node-based FS builder could be huge for enabling people who are currently intimidated by FeatureScript. The two would complement one another, not compete.
Re: [Chatbot Copilot] - We Built a FeatureScript AI Assistant That Outperforms ChatGPT
I'd love to see some YouTube demos before commenting too much.
That said, I would prefer that PTC/Onshape develop a first party solution to this problem. The problem isn't so much that we need an LLM powered assistant, it's that there are people who would like to build something like a feature that could be re-used, but is easier to do than fighting with queries and sketches in FeatureScript. Solving the FeatureScript usability issues with an LLM may be helpful, and I would certainly be willing to try it, but I'm not sure that's solving the right problem.
I feel like FeatureScript represents a huge, mostly untapped potential to change the way parametric mechanical CAD is done. Despite spending a fair amount of time going through tutorials and following the discussions on the Forum here, I find myself very frustrated by my progress or lack thereof. I haven't touched Grasshopper (parametric visual coding for Rhino) in a long time, but my memory of it was that it was so much easier to just get started and make something useful. I wish there was something that would perhaps live above FeatureScript which would be that simple to use, or put another way, I wish there were a way to to connect regular Onshape features into meta-features which could be re-used.
