featurescript
Discussion List
-
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",…
-
I am trying to be able to select a complete curve automatically
I am currently in the process of adapting a feature script so that it is perfectly adapted to our requirements. Similar to the sweep feature. How can I implement it so that I simply select the created curve, or I select a part of the spline and all tangential edges are automatically selected? Currently I have to select…
-
Sheet metal flange using featurescript
Hi everyone! 😁 I'm working on creating a very basic flange on a square flat sheet metal part using FeatureScript. My goal is to eventually generate a 90° flange by selecting the edge of the sheet. I managed to achieve it by copy-pasting the entire code from the official standard library, but I’d like to know how to simply…
-
Sketch "Use" in featurescript
I cannot find the function to "Use (Project/Convert)" an existing face (which the feature user would define), onto a sketch that I create in my featurescript. Is it not implemented, or am I just failing at finding it?
-
New Custom Feature - Spiral
Spiral Link: https://cad.onshape.com/documents/abb998532f54a132a42bea8b/w/b0d311a0342c2b1e722bdaf1/e/79973a0f955c53b07d20e46e Created by: Michael Pascoe, Cache River Mill. References: Split helix surfaces - Andrew_Troup Transforms - Jake_Rosenfeld Wood Grain Texture - Tim Rice Standard Featurescript Library Source -…
-
Is it possible to get the length of all the outer edges of a face?
Hi everyone, I have a surface with a hole inside, and I'm interested in the total length of the outside contours (excluding the length of the edges around the hole). i.e. the length of all the selected edges in the example below. Is there a way to get this wihout having to select individual edges, but only the face?…
-
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…
-
Composite part design
Hi Onshape designers, I wonder if there's a feature script for designing composite parts (I'm not talking about the Onshape feature). Are any of you facing this challenge? Before embarking on the development of a specific feature script, I'd be curious to know how you manage to achieve multiple ply representations with…
-
Weird error table is still working perfectly
I'm getting this error when I use a Custom Table I made in anywhere that isn't the origonal document. Table is still showing up and everything seems to be working. I have no idea what it is but it's kind of annoying having the yellow excelamation mark whenever I open up the table. Typecheck canBeTableRow failed…
-
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…
-
evCollision doesn't seem to work
I can't get all 8 "Clash type" results when clashing solid bodies. Here's what I can get: INTERFERE = Volumes and faces are intersecting ABUT_NO_CLASS = only faces are intersecting TOOL_IN_TARGET = only volumes intersect tool contained TARGET_IN_TOOL = only volumes intersect target contained NONE = ???????? EXISTS =…
-
Undocumented Hidden Featurescript
So far I have discovered: -opCreateOutline (creates flattened surace of input topology) -opExtractSurface (Used within opOffsetSurface) -?? notation for managing undefined variables -switch function All of which have no official documentation or any documentation what so ever. I also know that there is "Button"…
-
Beginner FeatureScript Help + Circular Pattern
Onshape Document: https://cad.onshape.com/documents/e14506ff4d20585b290e1eb9/w/f810b9cde10509e5ce6e5ed7/e/e9f37d1a61a2dd62e3b9d8fb After being interested in writing FeatureScripts but daunted by the task of learning it with zero coding experience whatsoever, I am knee deep in my first FS that isn't a step by step or hand…
-
Draw (New Custom Feature!)
Draw (New Custom Feature) https://cad.onshape.com/documents/bad94104a5ecdd5d422a7b40/w/ce1f9d49a79762d0e2431752/e/4fea5d9770def4e66ed79f03 Happy feature Friday! With this custom feature, you can create a spline (or polyline) and sweep by dragging the manipulator triad. If you like this feature, check out Freeform Spline by…
-
Triangular error icon in custom feature that is running correctly
Hey there, I've written a custom feature to rename bodies. The feature is working as intended, but often (sadly, not always) when I change features above this feature in the feature, I get this icon: The feature is still processing data correctly - the correct bodies are being assigned the correct names, the correct…
-
Sheet metal models and featurescript
Hello, We use feature script extensivley for running configurations. There are a few reasons for this, but essentially we can bypass assemblies, drive the configuration using strings rather than enums, and the configurations are typically much easier to maintain. In previous iterations of products we have done the…
-
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…
-
[Updated] Point pattern custom feature
Some time ago @cody_armstrong put together a great Point pattern custom feature. With the passing of a couple of years and nearly 1000 FeatureScript updates, today I published V2.0. Add to your toolbar: https://cad.onshape.com/documents/9fca78cb66a0bc83e359eb3e/v/401953fe6e5330bb77bf28ef/e/7052b96c07018ad97bbadbf9
-
Chisel (New Custom Feature!) 🆕
Chisel (New Custom Feature!) Chisel allows you to: * Freehand chisel your part in real-time to give it that custom wood look. Fun fact :) Chisel and Draw are currently the only two features in Onshape that allow you to do real-time freehand geometry editing.…
-
Multi Config - a new feature to generate all configurations
Introducing a new feature - Multi Config. This feature set allows you to generate all (or many) possible combinations of configuration parameters for a given part or part studio. For configuration variables, the user simply has to add each possible value that they want to include in the matrix of configuration parameters.…
-
Can Revision Numbers be set using FeatureScript?
Can Revision numbers be set using FeatureScript?
-
Auto Layout Feature
Hi! I am another member of the team of five college students, mentioned by Jacob Kingery, who got the chance to work with FeatureScript this school year, and this is one of the features we made. Let us know what you think! Auto Layout is a Feature we built to lay out parts for laser cutting or other manufacturing…
-
loft not working with guides ;-;
https://cad.onshape.com/documents/4415e93291eabbf9ee253eec/w/27d3564434c2b91b92bfdf5b/e/51a511cfa043954a4e85962d i am working on a keyboard frame and need to perform a complex loft. in this previous discussion thread i asked how to fix the connections in my loft, and got the answer i needed. however, i wanted to try and…
-
Points along a Curve
I am new to FeatureScript and am looking to create a (seemingly) simple script that places points along a curve, evenly spaced. Without getting into other spacing options, I would first like some guidance on how to do this given only a distance and a quantity, starting from the end. I tried to dissect the very nice Curve…
-
Need help to get the metadata of the edges where fillet is applied (Onshape API and Featurescript)
Dear Onshape Community,I am currently exploring the Onshape API and FeatureScript and have encountered a challenge that I need your help for. https://cad.onshape.com/documents/434d4a21b8a6c0778e403fa4/w/08494f0fabeef3bd3f45494c/e/3fb329dd4fa90642555fc853 In this project, a simple geometry has been modeled where a rectangle…
-
Selection N compound curves and generate a piece wise approximation and print to debug
I have a funny use case. I'd like to use the onshape sketcher to draw curves. Then I'd like a feature that can select N curves and process them to get piece wise linear approximations and then dump the points to the console or debug. My exact case is that when writing test cases in c++ I often have to generate small…