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
Is it possible to avoid logging in every time the browser is launched?
Regards,
Re: I need a little help
Yeah, you shouldn't use LLMs for this. They don't replace understanding, especially for a specialized language like FS. You'll get a nice-looking snippet quickly and then spend a hundred times as long finding the issues.
Michael's suggestion is really the answer here. Failing that, search the forum for custom features that already do this, or find similar custom features and understand their code.
_anton
Re: I need a little help
Compare and contrast - this is why you should not use ChatGPT, it's not even close…
FeatureScript 2615;
import(path : "onshape/std/common.fs", version : "2615.0");
annotation { "Feature Type Name" : "Grid generator", "Feature Type Description" : "" }
export const gridGenerator = defineFeature(function(context is Context, id is Id, definition is map)
precondition
{
annotation { "Name" : "Grid spacing" }
isLength(definition.spacing, { (millimeter) : [0.1, 100, 100] } as LengthBoundSpec);
annotation { "Name" : "Rows" }
isInteger(definition.rows, { (unitless) : [1, 10, 100] } as IntegerBoundSpec);
annotation { "Name" : "Columns" }
isInteger(definition.columns, { (unitless) : [1, 10, 100] } as IntegerBoundSpec);
}
{
const sketch = newSketchOnPlane(context, id + "sketch", {
"sketchPlane" : plane(vector(0, 0, 0) * millimeter, vector(0, 0, 1))
});
for (var i = 0; i < definition.columns; i += 1)
{
skLineSegment(sketch, "vertical" ~ i, {
"start" : vector(i * definition.spacing, 0 * millimeter),
"end" : vector(i * definition.spacing, definition.rows * definition.spacing)
});
}
for (var j = 0; j < definition.rows; j += 1)
{
skLineSegment(sketch, "horizontal" ~ j, {
"start" : vector(0 * millimeter, j * definition.spacing),
"end" : vector(definition.columns * definition.spacing, j * definition.spacing)
});
}
skSolve(sketch);
});
Re: Onshape AI Advisor Beta (Coming Soon)
.
I'm really excited about where this is going.
When it eventually comes to other Onshape studios, I'm hoping it will be able to suggest workflows and solutions like:
- To do this, you can use the Arena integration.
- Here are the steps to do this with Onshape's native features (10 steps). However, here are some Custom features I found that can do this in one step.
- Onshape doesn't natively support this kind of simulation, however here are some integrated apps that do.
- For this, you will need a top down hybrid approach. Start by creating a variable studio, next create a part studio with skeleton sketches. Etc…
.
They mentioned they wanted it closed source so that they could control the solutions, but perhaps there could be a checkbox to "Search public forums" which would also let it search the forum for answers since there are tons of use cases and great questions on the forums that are not covered within the learning center.
It would be especially useful if it had access to:
- FeatureScript Documentation
- Standard Library Source
- Onshape Developer Documentation
- Glassworks
- Onshape Inc. Public Repositories
- App Store
- Onshape Forums
.
Onshape AI Advisor Beta (Coming Soon)
I just watched the recorded stream of the Quarterly What's New, and @GregBrown and @cody_armstrong added a "One more thing…" near the end:
I'm very interested to see this, as I've been using ChatGPT more and more for certain things. When I first started, the hallucinations (AKA BS) were sometimes painful, but now with "deep research" and 4o, I have to say that it's often pretty amazing the level of information and synthesis that's possible. I can see this being very useful. Any chance we'll hear more about the platform used to develop this Onshape functionality?
What I'm really hoping for as this expertise is built at Onshape is to see an AI tool for helping with FeatureScript.
BTW, please make the "one more thing…" a tradition with these streams. It will definitely make them even more worthwhile to watch.
S1mon
Re: icons
I found it. I didn't have ""Icon" : icon::BLOB_DATA," expression in annotation with feature name. Thanks
maciek
Re: Help! Challenge: Fretboard Generation
I wouldn't use variables at all. Do it all in the feature. You can select (or create) the fretboard and either select a modelled fret or even better, create the fret in the feature then use opPattern to create the others.
Re: Auto Layout updated to V3.1: oriented parts!
This will happen sometimes depending on the input components, and I would argue isn't solvable in a FeatureScript context.
Since this feature is part of the total regeneration time of the part studio, this feature uses a First-Fit Decreasing packing algorithm to ensure deterministic operation and fast performance (in this case O(N log N) for N parts). Finding the optimal solution is NP-Hard and is therefore essentially not doable in any practical amount of time, and certainly not in a FeatureScript.
If optimal packing is critical for your application I'd suggest using one of the dedicated tools for that - I've used deepnest.io previously, which is open-source. Note that that is also not guaranteed to find an optimal solution, but it does keep trying options for as long as you have patience to let it improve.
Re: Help to create angled rim around entire shape
.
The real question here, is why it's taking all our PRO users more than 3 features to do this 😉
Re: Sliding Ball Mate?
dynamically flexing parts are not available indeed so your work around makes sense. if you can make the end of the tube straight, you could use a cylindrical or sliding mate there depending on the Degrees of Freedom you want to allow. then apply a linear relation.
Feel free to copy the document. add the assembly as a sub- to your main-. then edit in context to change the routing curve.
some tricks:
-the first and last point have a derivative as well as a second point right behind it to make it straight locally.
-I used a variable studio so you can set the bowden-slide-lenght in one go for both the part studio as well as the assembly (it sets the limits there)
-Couldn't help myself and made it fully configurable in v3






