-
Featurescript Dev Paid Contract: BOM Auto-Kitting Featurescript
I don't know if this is the right place to post this, so feel free to take it down if it isn't! I'd like to hire someone to write a custom feature script that will automatically take an assembly and create a 3d-printable "tray" with bins labeled with each parts part number and revision, where the bins are large enough to…
-
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…
-
New FeatureScript: Cosmetic Knurl
Hello everyone, I released my Cosmetic Knurl FeatureScript: https://cad.onshape.com/documents/0bad5bfa3637bf84138a2a24/w/3daa9f730d6802a81ead8a58/e/af28a7d9efffdd0020743e56 This should help if the 3D modeled knurls are taking to long to regenerate B) You can also type in a custom name and then the name is shown in the…
-
Is there any good way to sync FeatureScripts among several users?
I am part of FRC team 2704, and we are trying to use a few featurescripts from other teams, but getting them onto everybody's account is proving painful. We do have a classroom set up, if that helps or hurts us. The main issue we are coming across with just sharing links to the documents is that some have many…
-
Adding volume as a custom property?
Back in January, mass was finally added as automatically computed property. It seems like other properties can be added through FeatureScript. I want to add part volume as a custom property which can then be added to standard drawing notes. How do I do that? Is there a standard way to do this?
-
Detecting used mate connectors?
I am hoping to develop a feature that will scale a model without scaling its used mate connectors. This will allow me to preserve the size of a joint (e.g. a screw hole) while scaling the rest of the model. Is there a way to detect used mate connectors?
-
Point Pattern, set orientation for each?
I'm using @cody_armstrong 's Point Pattern FS quite a bit. Very nice!! Some of my patterns would benefit from being able to set the orientation of each thing patterned and I would like to add that functionality to a copy of "Point Pattern". Something simple and click-able like the "reorient" like when placing Mate…
-
What does this error message mean?
Posted previously today about a FeatureScript I am working on for some learning/practice. I made some progress after getting stuck on a small miss of coding, but now I have this error: The first mate connector stops working, and the second one is fine using the same format.
-
Second opTransform not working following same format as previous one
I am practicing some of my FeatureScript skills and understanding (sadly after having to take a break from FS) by creating a FeatureScript that makes three mate connectors in each of the three axis orientations for a selected mate connector location. I can't seem to figure out why this call line is not working when the…
-
How do I export a value to the part studio in FS?
Sorry about the previous post… tried to press enter to move to the body box and it sent instead… As the title states, I am having issues with exporting a variable back into the part studio from my function… I want to do my calculations in the script and be able to retrieve the result of the calculation… here is my feature……
-
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…
-
Connections array for opLoft not being applied
Hello! I have been working on creating a featurescript to loft together two identical spur gear profiles at a vertical and rotational (around Z) offset, creating a hyperboloidal profile. the gear profiles generate without issue, and there are no errors in the featurescript, in the code or generation, that are reported. The…
-
FeatureScript Video Walkthrough Series
Hello everyone, I've been wanting to make some FeatureScript training content as of late, so I decided to record a series of videos where I create a new FeatureScript from scratch while talking through my thought process and code as I go. The full Youtube Playlist is here:…
-
qAdjacent finding phantom edges in deform feature
Hey there, I'm working on a feature that will take a body (solid or sheet), a 'From Wire' and a 'To Wire' and deform the body from the From wire to the To wire. In many senses, this is similar to some other features I've seen published (Flex, I'm looking at you), but I haven't been able to get the behavior I'd like with…
-
How to name sketches created in featurescripts?
The following code does not work as intended. When running this feature script it will produce a sketch named "Sketch 1" in the feature tree. How can I change the name to "Name of my sketch"? var sketch1 = newSketch(context, id + "sketch1", { "sketchPlane" : qCreatedBy(makeId("Top"), EntityType.FACE) });…
-
External table content, creation, and modification
Apologies if this question has already been asked or answered in some form — I took a look around the forum and couldn't find anything that really fit my query. My ultimate goal is to add additional thread specifications to both the Hole and External Thread features. It seems reasonable to do this by creating a new table…
-
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)…
-
Preserving Attributes on Sheet Metal Parts in FeatureScript
Hi, I have a sheet metal part where I set custom ids on its surfaces so that i can keep track of them : setAttribute(context, { "entities" : faceOfASheetMetalPart "name" : "CustomId", "attribute" : "aCustomId", }); That works great, but when I apply fillets to the sheet metal, the attribute disappear. How can I keep track…
-
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 =…
-
trouble using opSplitPart() with multiple faces in a single body
I am practicing my surfacing and once I got to a useful base object I wanted to add some more solid-like features to it. I'm working on a custom feature to make this easier. I hoped to make the workflow be kind of like a wrap, but without warping and applicable to 'any' surface, not just cylinders and cones as I believe…
-
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…