feature script
Discussion List
-
Access to API methods from feature script
Hi, all. I recently began to learn the feature script. And I have such a question. Is it possible to get access to api methods in a feature script?
-
Can a FS UI have a slider?
Is it possible to have a slider in a FS UI? Something similar to the Alpha slider in the material appearance UI, where the user can either drag the slider to choose a value or enter a number.
-
[New] Four Bar Linkage Generator FeatureScript
Hello all, I have been working on this Four Bar Linkage Generator FS for some time now. It creates the sketch lines for each link and plots the displacement curve for a specified point. All that is needed is a mate connector for the origin. Give it a try and reply with whatever cool linkages you come up with!…
-
Trying to query for edge betwen a loft and an extrude
In featurescape I am trying to add a fillet on an edge between a rocket in and body (loft and extrude). I've manually put in in the fillet, but I would like to do it in featurescript ("TODO" in the feature script). I need form a query to find the edge. I've tried a bunch of things, but no avail. Something like ... var…
-
import features script from other public document
hello , i try to create a rack and a pinion faeture script. the script to create spur gear already exists thanks to @NeilCooke and i want to reuse it in my own script by using the import capability of Feature Script https://cad.onshape.com/FsDoc/top-level.html but i have some warning on Feature studio from the import line…
-
difficulties with circular pattern of an opSphere
I have difficulties doing a circular pattern of operations, especially with the opSphere operation. Don't know what's wrong and Onshape says regeneration complete. Any suggestions? document link: https://cad.onshape.com/documents/8e26d19f48d94a039d8e8399/w/d0ca70e6dd864413dcb64308/e/b830d5993f0ebf5a2041c6e8 Thanks!
-
FeatureScript: Bounding Box Sketch
Is there a way to create a bounding box sketch on the flat pattern view of sheet metal? I need it for the stock size call out on the drawings, kind-of a pain in the arse doing it manually.
-
can i create a method ?
i need to create a method , because i need to do some operations into this method ...so, when i call this method, but how can i create a method and how can i call this method?
-
Library menu
Good afternoon, I was wondering if is any way to do a similar filter but using our own library. Is there any Feature Script to do this (e.g. similar to beam )? Thank you
-
holes to points in circular pattern
i want to do holes. i created points in a circular pattern as the center for the holes. no i have difficulties defining the locations and the scope in fs for the holes. const anzahl = dimensions.Rotation; for (var i = 0; i < anzahl; i += 1) { const t= rotationAround(rotationAxis, (2*PI* radian) * (i/anzahl) ); const…
-
feature script - extrude's entities queries
https://cad.onshape.com/documents/48ec052b1145ddd86705ef78/w/91cdf3007cb145b3e5c7fbbf/e/305d955b8b71be5086653bad I am trying to create a script for springs. In partstudio it works ok with changing variables. Now working in feature script , I am not able to find the right entity-query I need three bodies for the later helix…
-
Call skEllipse(Id (array), string, map) does not match skEllipse(Sketch, ..., ...)
Im have some difficulties with my first Loop. I'm trying to create ellipses on different sketches. heres the code I want the ellipses to be on different sketch heights, but they are all on the same heigth. Any suggestions?
-
LOFT_SELECT_PROFILES error
I'm trying to create a loft from a defined face to an created point. I always get the error LOFT_SELECT_PROFILES. //Loft var top = (normal * definition.Height) + origin; const vertexID = id + "topVertex"; opPoint(context,vertexID,{point : top}); var topVertex = qCreatedBy(vertexID, EntityType.VERTEX); var profiles =…
-
Relif Cut
Hello, is there an automatic function to make a free cut for holes that are too close to the bending edge? Once constructed an example. https://cad.onshape.com/documents/17763e1bca9abe8f571334e7/w/4e6c4b1da9827dde10ae8531/e/209f66484bca7a61ca701914
-
Call user created scripts in another script
If I have written one script called custom_axis, and am now writing a new script. How could I call custom_axis in this new script? I have tried entering custom_axis in the hopes ti appears in the drop down list, but it doesn't. How could I do this? Thanks Lee Hesketh
-
Customized toolbar
Do we have capability in OnShape to create a customized toolbar as in CATIA? I tried featurescript but could create customized commands not the toolbar. Appreciate your help in this.
-
How to get the "Part_Number" with FeatureScript?
Hello Everyone, I need to name my configurations parts automatically. The "Part_Name" should be "Part_Number" + "Part_Description" The reason is when I export the part as a STEP-File it should contain the Number and Description in the File Name. I managed to automatically create the "Part_Description", but I can't request…
-
How to use the Beam Profile Generator
How to use the Beam Profile Generator to add a new profile to the look Up Table in the Beam Profile tab?
- functions question
-
Feature Script: How to set the "oppositeDirection"-Tag for extrude?
Hey! I'm starting with feature script and work on a small script that simply needs a thoughhole. I ask the user for a point (around which I draw a circle) and a face to which the hole is going to. This part of the script looks like this: annotation { "Name" : "Vertex for center", "Filter" : EntityType.VERTEX,…
-
Is it possible to intersect path and plane without using opPlane and deleteBodies
The below seems inefficient. function CurveIntersectPlane(context is Context, id is Id, curve is Path, plane is Plane){ var ppPlane = opPlane(context, id, { "plane" : plane, }); var r = evDistance(context, { "side0" : ppPlane, "side1" : qUnion(curve.edges) }).sides[0].point; deleteBodies(context, id + "delete", ppPlane);…
-
Is it possible to check if a point(x,y,z) is on a surface or in free space?
i'm making a script that genrates some holes automatically.. I'll need to check if the polygon i'm extruding is in free space or on a surface? is that possible and how?
-
Creating polygons with a for loop?
I would like to create multiple polygons with a for loop depending on some info from the user, right now i just create one at a time because i cant iterate an id name? Now i go like: skRegularPolygon(sketch, "polygon2", { "center" : pointArray[2], "firstVertex" : vector(pointArray[2][0]+(4)*millimeter,…
-
Finding a meeting point(x,y,z) of two lines?
I got two lines defined by the user, and i want to return the point where they meet... var buttomLine = evLine(context, { "edge" : definition.buttomSide }); var leftLine = evLine(context, { "edge" : definition.leftSide }); i tried using their origin, but they dont have a cummon coordinate. How can i find the meeting point…
- NEED SOME EXPLANATION