-
How to visualize cut features
Hey everyone, I'm working on a FeatureScript that cuts both a bolt hole and a nut slot in one feature, according to my specific needs. The feature itself is working great so far. What I am struggling with is: I am trying to figure out how to best visualize the hole that's being cut. Typically, most of the holes' geometry…
-
cannot find a good worm gear featurescript
Hello again, I am looking for a worm gear to worm gear drive on a 12 mm shaft (maybe 10mm) to be a 1:1 at 45 degrees. I want to 3d print this and I only found 2 feature scripts dealing with this. The first was a globoid worm drive, which is honestly a bit weird. Then I found a promissing worm gear feature script BUT, it is…
-
Feature script for filling in missing faces to fix faulty topology.
Hello, I want to create a feature script that let's me select bodies with missing faces (faulty topology), i.e. surfaces, and automatically have these missing faces filled. So far I came up with the following feature script:…
-
Script error i can't resolve please help. It's driving me nuts
here is my code. import(path:"onshape/std/standard.fs",version:"2581.0"); // Offset Skin FeatureScript for Xbox Controller (with Multiple Grip Patterns) // Creates an offset skin for an Xbox controller, allowing interactive // definition of the front face cut-out region and multiple grip patterns. export const xboxSkin =…
-
center path finder feature
Hi I have a problem with my script. I wrote a script that finds and adds the center path of a given body. So its the center between two given edge paths on the body as well. However I encountered an error and it didn't work, would appreciate any help! thanks. The blue body was created using a wiring feature. Wiring…
-
Changing lookup table reference from an ENUM
Hi All, I am creating a "simple" feature script which swaps the lookup table for a different size table (Metric / Imperial set sizes). I'm getting two issues which I hope are simple fixes but I can't seem to figure them out. Any help would be appreciated. I am getting a duplication error on the definition.sSize…
-
Change Material of Parts with Feature Studio
We have code that can update multiple material types at once. However, there's a bug in the software: if a material type is changed manually for an item, the code won't be able to update that item later. and If we try to change appearance with same code then it works fine. Is it an BUG ?! Here is code FeatureScript 2543;…
-
qCreatedBy(sketch_id, EntityType.EDGE) returns more edges than I drew
I drew a sketch with 11 edges, but qCreatedBy(sketch_id, EntityType.EDGE) returned 24 edges, and I parsed these edges and found that some of them were overlapping (all parameters were the same, except for deterministicId). Why is this happening? What are these "copied edges" used for?
-
Mounting Boss FeatureScript
Hello all, I've finally finished up this FeatureScript and thought some others may find it useful. It's for making different types of mounting bosses in plastic parts. These are used for adding screws to plastic enclosures, mounting circuit boards, etc... The script was based off of the Hardware Boss script by @NeilCooke.…
-
A question about CapType in Featurescript
There are three types about CapType: START, END, EITHER My question is: suppose a square sketch is extruded to form a cube, then the cube's edges have different CapType types. Is there a way in FeatureScript to trace the edges of a cube back to their originating edges or points in the sketch? For example: CapType:…
-
Is there a function in FeatureScript can perform operation `suppress`?
Hello everyone, my question is: Take chamfer as an example. Its operation is on some edges or faces. However, after the operation, the operated faces or edges will disappear, making it impossible for me to trace their information through transientId. In the main drawing page of onshape, the chamfer operation can be…
-
Please help me: `deterministicIds` DO NOT in ALL ids returned by `qeverything()`
I want to convert deterministicIds(in feature list) into query and then parse it. The conversion code is as follows: body = { "script": "function(context is Context, queries) { " " const _ = qEverything();" " const all_q = evaluateQuery(context, _);" " var target_q = -1;" " return transientQueriesToStrings(all_q);" " for…
-
how to use `queryString` in feature data?
I want to parse a CAD parameter data, including sketch, extrude, and chamfer, etc. I first got the feature data, and it seems that the queryString in it can help me get further information. But now I don’t know how to use queryString, can anyone help me? Thank you "featureType": "newSketch", "btType": "BTMSketch-151",…
-
Wood Grain Effect
Hi all. Simple question is the wood grain feature script available on the free licence version of Onshape. If so where can i find it please
-
Joining Tabs/Tags on Frames
Hi, Can anyone help me with trying to set up a feature script so that I can easily add in joining tab/tags to frames using either box section or angle. i have tried with the following code but keep getting errors. FeatureScript 1640; // Specify the FeatureScript version // Feature definition annotation { "Feature Type…
-
Are we able to return a Computed Suface Area of the Sheet Metal Top Side Only in FeatureScript?
I've been searching without luck to see if there is a FeatureScript that outputs into a custom table, the computed surface area of only the top or 'good side' of a flat sheet metal part on the flat? If not, is there a way to return this value in a FeatureScript that I'm not seeing? The basic evArea returns the entire…
-
Custom Frame FS without precondition
Does anyone know how to implement a custom frame in featurescript without using the precondition/UI? I found the FS for the frame tool in the std documentation that uses the UI, and I am wondering if it's possible to create a frame without it. For reference there was a post in here on Sept 4 about a custom Frame: FS Frame…
-
New Custom Feature: HAVF Profiles - Standard Airfoil Profiles
We are releasing an exciting new Custom Feature! Introducing HAVF Profiles, built in collaboration with Austin Holbrook and Greg Brown. This feature comes loaded with an extensive library of airfoil profiles, guaranteeing continuity at the leading edge and providing control over the core variables of the profile, such as…
-
Custom Feature: Clone Curve to Points
Allows you to move or copy a 3D curve to a new location by defining the new endpoints. New curve retains the essential "Character" of the original curve but is stretched parallel to new Chord to reach target points. (Chord is a line between curve endpoints) User can also scale new curve normal to new Chord, and rotate new…
-
Next number in part number scheme feature script
How can I modify my featurescript for an O-ring part studio to automatically generate next part number for each new configuration, following the in-built onshape numbering scheme? Currently, I have to manually enter the desired configuration in the properties and create a version within the part studio. I have read that…
-
Get part studio name within featurescript
Can you get part studio name within featurscript? Why? I'm using a CAM that allows importing of solids with metadata via a CSV file. In said file the first column must have the File path of the .x_t solids that it will import. Since conveniently onshape can export parasolid files with the part studio name - part name (a…
-
Freewheel Mate possible via FS?
I've asked about a means to create a freewheel functionality using the built-in mates earlier. It wasn't thought to be possible. I didn't find any useful workaround either, and I am not a FS wizard. Now I seem to have another project coming that calls for a function where things can rotate, but only one way. What do the FS…
-
How to retrieve all the feature ids used to generate a part in a part studio
Hello, Is there any way to know what features and sketches (by ids or names) are used to generate a part, given the part Id using featurescript? For example, in the image, When I click on part 1, Extrude 1 is automatically highlighted, which means it's saved somewhere. Thank You.
-
How to have a Sketch as a parameter
I’m not sure I’m getting the terminology correctly, but when I’m saying parameter I’m referring to the light-blue input boxes that are in the feature-menu that pops up when creating a new feature. Say, in a Part Studio, I creat a new Extrude feature. I can either manually select entities to extrude (with my cursor), or I…
-
How Do I Reach Out to FeatureScript Dev?
I am attempting to bug report for FeatureScript's Point Pattern but am not sure how to reach out to any devs since I cannot find anything online or on featurescript docs. Any help would be appreciated!
-
opTransform error in FeatureScript
Hi, I am trying to do an opTransform of type copy, but I am getting an error I don't understand. It seems like the error is saying that TransformType.COPY is a String and should not be a String, but it doesn't look like a string to me. Could someone tell me what I am doing wrong here? Thanks, Jason This is my code:…
-
Control points and knots! A new custom feature...
I have finally published something - I've been messing around with this tool for ages, but finally here it is: https://cad.onshape.com/documents/d675d2ccbcf6336cf8ef52bb/v/8384e60ced2c089ec8e3d2a9/e/853bddb5d9a1fffded23ae80 For advanced curve and surface modeling it is usually critical to see exactly where the control…
-
Another feature script ID error...
@opPlane: Parent Id FIZxwPCJn00T9Nq_1.0 used at two non-contiguous points in operation history (Cannot have FIZxwPCJn00T9Nq_1.deleteBodies2.3 between FIZxwPCJn00T9Nq_1.0.SparPlanes and FIZxwPCJn00T9Nq_1.0.0) I don't know what is wrong with this clearly the ID'd are different because they are unique strings... the ID + i +…
-
multisort an array/custom table with featurescript
Hi, As I start always: I am not a programmer, but I think I want something fairly simple: I want a 'multisort' in an array or custom table. At the moment I postprocess the tabel in an php script and use: array_multisort(array_column($arrRondjesGrid, 'y'), SORT_ASC, array_column($arrRondjesGrid, 'x'), SORT_DESC,…