-
Extrude problem within a loop
I try to make a feature script that takes a json file with parameters and executes some extrudes in a for loop. That works until a certain index, where it crashes with a EXTRUDE_NO_SELECTED_REGION error. If I instead create new parts, it finds some regions.…
-
Issues about the feature scrip to generate a parametric curve
Hello, I'm an amateur designer using the Onshape platform with very good results so far, I must admit. However, I've recently run into a problem I can't solve. I'm trying to generate an involute profile, and when I load the data, I get an error message. To explain, when I write the equations for X and Y, I get the error…
-
Feature script extrude offset issue
Hi, I would like to know how I can make an extrude with an offset within a feature script. The link below points to an example project with a failed offset extrude. The parameter "hasOffset" is set to true and the "offsetDistance" is set to 5 * millimeter. The feature script generates without error but also without offset.…
-
New FeatureScript: Mold Guide Pins
Hi everyone, I made a new featurescript to create pyramid and hemisphere guide pins for 3D printed molds. I based the functionality on the hole tool, where you just have to select points. Add points to the parting surface and then select them to add and subtract guide pins from each side. Link: William's 3D Printing…
-
Getting name of derive that imported parts
Hi, I'm very new to featurescript and I'm making a simple cutlist table which is working. I'm deriving my parts (for example cabinets) from a configured library part. I would like to be able to get the name of the derive feature that imported the parts so I can prepend it's name to the actual part name on the body. Any…
-
Two bowls with almost the same dimensions
I want to create to different rectangular bowls with almost the same dimensions. They differ in shape and length and width and depth. The remaining dimensions like thinkness, spacing and liddepth are the same. I drew and formed the first bowl. I wanted to use the same variable table for the second bowl. However I got…
-
any "unique sculpting" scripts?
I've been on the lookout for scripts that can add "uniqueness" or "life" to some models. To explain my question: This is "wood grain" script (mainly used to "show" that a part is "wood-like") But if you don't use it for its "Intended Purposes" you can make intresting models… If you know any script that have such…
-
Parametric Cycloidal Drive Featurescript
Hello, I've made a parameterized cycloidal drive generation script that I've found very useful, and I thought I'd share it in case anyone else was interested. I'd love any feedback 🙂 https://cad.onshape.com/documents/8b3df8cee04d69a41c0ee558/w/896df62751b78bc0bd9e2148/e/6a0d9aecc7ada0f635581c7a
-
Custom Features Collection
I joined the Onshape design team in January of this year, having previously worked in NX for 11 years. At first, I was hesitant to get to know the software, but it quickly became apparent that beyond the built-in functions, there are also many custom solutions for different tasks. These are nice, but it is almost…
-
Mapping faces from a plane onto another plane
I'm trying to make a function that "wraps" a plane onto a plane or onto a curved surface. It works for curved surfaces : const targetWrap is WrapSurface = makeWrapSurface(context, definition.target); const sketchPlane is Plane = evOwnerSketchPlane(context, { "entity" : definition.faces }); var result is Query = qNothing();…
-
How can I copy errors and warnings?
Newby to FeatureScript and using ChatGPT to help out but one thing that's driving me crazy - warnings and errors appear as "floating" text boxes meaning they only appear when I hover over the error and disapear when I move my mouse. This makes it impossible to "copy" the error and paste it into a browser. Is there a fix…
-
How do we find useful feature scripts?
@Jake_Rosenfeld posted a very helpful article about adding FS at the end of this discussion Jake or others - I have seen this question on forum before but I do not remember a good answer. I know FS is not intended long-term solutions to generally required functions. However, for now there is a lot of good stuff which we…
-
qEdgeVertex suddenly missing – related to default libraryVersion?
Hi everyone, I'm running into a frustrating issue with FeatureScript inserted via the Onshape API (from a Python-based workflow). Recently, my script started failing with an error saying the qEdgeVertex function is undefined. After some investigation, I found that the root cause seems to be the libraryVersion — it's being…
-
Best Way to create Hydraulic Hoses
Hi everyone, I'm looking for the best way (as of 2025) to model hydraulic hoses in Onshape for simple hydraulic assemblies. I already have a library of standard hydraulic components (see attached image), such as cylinders, pumps, valves, and fittings. What I'm missing is an efficient way to connect these components with…
-
Editing Hole Callout formula
Counterdrill hole (Countersink hole + Extra head clearance) is an option available in other CAD software, but doesn't seem to be an option with Onshape currently. I have cobbled together a feature script based on Hole feature that does the job geometrically, but the callout is as if it's just a Countersink hole. I'm…
-
How to Identify Faces Directly Created from Sketch Edges in an Extruded Part (FeatureScript)?
Hi everyone, I’m working with FeatureScript in Onshape and I have a question regarding extrusion operations. I’ve created a part by extruding a sketch, and now I need to identify which faces of the resulting solid are directly created from the edges of the sketch (i.e., the side faces that are the result of extruding the…
-
FeatureScript versions
I'm new to FeatureScript, but an experienced programmer familiar with many languages, but having trouble finding some specific useful documentation. I can't find proper information regarding the versions available for the version statement at the start of a script, and versions. The only references I've found show things…
-
Snap Hook Feature Script.. where is the groove??
Hi, new to Onshape. Trying to learn how to snap connect parts for 3D Printing I found the Feature Script called Snap Hook. It seems that it does only half a job. Where is the groove for the hook (cantilever)? Am I missing something? It would be really useful. Is there a second feature script for the groove? Kindly asking…
-
Error with extrude on point selection
So I just started feature script and was going through the lessons, however when I tried to do create a extrude on a sketch that I made on a point it failed However when I remove the extrude I can see the sketch so why doesn't this work? Here is the doc…
-
How to use function autocomplete?
I am trying to write my own functions with feature script. I want to use autocomplete the way the standard onshape functions do. The problem is I can't get it to work. I've been copying what I see in the standard library with no luck: Here's a dummy function with what I'm trying export function dummyFunction(id is Id)…
-
Get multiple vertices from a query
How would I go about getting multiple vertices from a query? I have a parameter that creates a query of 3 points. I am attempting to make a plane using the 3 points. Here is what I have so far: annotation {"Name" : "Points", "Filter" : (EntityType.VERTEX), "MaxNumberOfPicks" : 3} definition.points is Query; var points =…
-
Featurescript Boolean of Booleans not working
Hi! I am having trouble with booleans in featurescript when using the result of a boolean as a tool for another boolean. I have attached a simple example to explain my problem better. In this case, I generate 3 intersecting cylinders: I want to do a Boolean to combine the first two and then another Boolean to intersect the…