-
Failed to add custom feature "Expulsores" to toolbar.
How to create featurescript with which you can work on other projects and without error of:-> Failed to add custom feature "Expulsores" to toolbar. </code>annotation { "Feature Type Name" : "RESTAR PIZAS" }// para que la imangen valga tine que ser un .sgv<pre class="CodeBlock"><code>export const myFeature =…
-
Instead of describing requests in English writing, scribe in FeatureScript directly what you mean!
Make FeatureScript capable of geometric manipulation to the core engine, to avoid the need for translation; Wow! How eficient would that be?Anyone afraid of that? Can that be done?
-
Drawing
Hi,can you suggest me if there is a featurescript function that make a drawing of a part?I want to create a part and then call a featurescript to make the drawings.Is it possible?ThanksCarlo
-
Can a specific configuration be activated by a variable in the Part studio ?
Somebody
knows a way to make a specific configuration (in P.S.) conditional to a value
in that P.S. EX: A
configuration where a part is suppressed, is activated by a specific value of
a dimension measured with “Measure distance” (MD).
-
Building a full model with featurescript?
Out of curiosity - does anybody here use featurescript to build "full models" rather than well... just features? I haven't really dug into featurescript myself, but plan on it when I have some time. I have found many custom features created by other users extremely useful, but I don't really know what I'd try to use it for…
-
How can I make an array of points created by a for loop in featurescript?
for (var i = 0; i < numberOfDowels; i += 1) { opPoint(context, id + ("locationPoint" ~ i), { "point" : toWorld(cSys, vector((fenceDistance + (dowelSpacing * i)), 0 * inch, 0 * inch)) }); } var locationPoints is array = evaluateQuery(context, qCreatedBy(id + ("locationPoint" ~ i), EntityType.BODY)); This gives me an error…
-
opSplitFace - Invalid Input
I hoping someone can explain to me why this script is failing: https://cad.onshape.com/documents/13e9c12a44cf54f198c08ea5/w/2c9e84ed0d4301b95e18ebf2/e/ed69f87a561cc4d22f3deb33 Ultimately this is to be part of a more complicated script. I wrote this simple script to troubleshoot and apparently I don't understand what…
-
skConstraint / Newbie to featurescript
I'm just starting to work with featurescript and I have no programming experience so there are some large gaps in my knowledge. I've been working off of a script written by someone who actually knew what they were doing which imports solid tool-bodies from a separate context and uses them to create machining details at…
-
list of boolean
I want to export a list of boolean , similar to export enum but list of strings, where user can check 1 or more strings. Can somebody point me to the right direction?
-
Featurescript - Evaluate centre of circle
I am embarking on my first custom feature creation! I have run into an issue someone might be able to shed some light on.I have selected the edge of a circle and would like to get the centre point to place a hole on. I have the below code to evaluate the selected circle: var circleCentre = evCurveDefinition(context, {…
-
Hole Feature Naming
Is it possible to create a hole feature that names the feature the same as the tap information or clearance information? For example if a hole feature creates a tapped hole for a M3x0.5 screw, the feature would be called M3x0.5, and if the hole feature creates a clearance hole for the M3x0.5 screw, the feature would be…
-
How to get adjacent sketch entities?
I'm trying to use qAdjacent to find entities in the sketch which share a vertex, however qAdjacent only seems to work properly for non sketch entities. If I select an edge on a body it works fine. My query is: qAdjacent(qNthElement(definition.myEdges, i), AdjacencyType.VERTEX, EntityType.EDGE)<br> It works just as expected…
-
Projection of an edge onto a sketch
considering I have an edge selected(input) and would like to project that edge onto a sketch from a feature script, using the 'skConstraint' command in the feature script is the solution but i am unable to figure out the syntax for using the 'Projected' constraint type in this situations. any suggestions????
-
evRaycast not reporting all face intersections
I'm trying to use evRaycast to get all points where a ray intersects the face of a body. It mostly seems to be working however I have run into a strange issue. A single point is missing from what I would expect to be an intersection. I've included a screenshot where I have circled the "expected point" in black and a link…
-
Linking a configurable variable in an assembly
Given that (to my knowledge) there is no way to have a sketch text linked to a configurable variable I went ahead and wrote my own feature script that takes a text field in the from a configurable variable and engraves said text onto the part.This part is then used in an assembly and I want to, in the assembly level, be…
-
Creating Plane through 3 Points in featureScript
Does anyone have any tips for creating a new plane through 3 points. Have not had any luck with all test attempts of cPlane, opPlane, etc. var b = vector(32, 56, 0) * millimeter;var a = vector(88, 0, 0) * millimeter;var c = vector(88,56,50) * millimeter;var _origin = (a+b+c)/3;var _normal = cross((c-a), (b-a));var newplane…
-
Sketching in FeatureScript - Coincident constraint between two vectors
I'm currently learning how to sketch in FeatureScript. I want to know if there's a way to sketch with constraints before using skSolve. For example if I want to make a tangent arc with its two end points coincident to two end points of a pair of parallel lines. The arc has to be tangent with both lines. Is there an easy…
-
Ellipsoid custom feature
In support sometimes we get a chance to create tools that bridge the gap between current functionality and potential future functionality through the use of FeatureScript and custom features. In this case, a feature to create ellipsoids! With independant x/y/z dimensions. Check it…
-
How to calculate distance across a surface?
My goal is to write a script to add a hexagonal pattern of hexagonal tiles across a series of adjacent surfaces. However, I'm new to Featurescript so at an early stage. Where I'm stuck at the moment is trying to convert from real-world distances to the "2d unitless parameter-space" used as parameters…
-
Configurations update: Edit FeatureScript IDs
In addition to the other new features already mentioned, Onshape 1.78 added a piece of functionality specifically for the purpose of writing FeatureScript that builds configured Part Studios. As you may already know, the user-facing names of configuration inputs and the user-facing names of configuration table rows can be…
-
Using partQuery in FeatureScript to retrieve parts
Hi, I noticed the "get parts in PartStudio" returns a partQuery that looks like below: "partQuery":…
-
Evaluate existing FeatureScript using API
I understand the 'Evaluate FeatureScript' endpoint takes in "script" and "queries" in the body of request for API call and I have had some luck using the API this way.But I keep thinking there should be a way to reference an existing FeatureScript that lives in a document. Does anyone have any experience doing this?…
-
LaserIt Feature Release
Hi Onshapers! I just finished this feature called LaserIt, which takes an arbitrary 3D solid and slices it to be laser cuttable (or some other 2D planar machining technique). Here are some images of it in action! I'd love to hear what you think!…