-
Feature script CANNOT_RESOLVE_ENTITIES error
Hello, I am very new to feature script I am writing a feature script that will automatically add holes to a part at a fixed spacing. The goal is to pass a line along which the holes should be cut, and the spacing desired and have the script decide how many holes will fit, and how to center them along the line. I have the…
-
Problem: opPlane() with a rotated coordSystem creates a "non-rotated" plane
I'm trying to write a feature script that takes a curve and a point as parameters (among others), and creates a plane with the x-axis pointing in the direction of that curve's tangent at the given point. (The motivation is, I want to then manually draw a sketch on that plane that extends the curve in some way.) Everything…
-
How to assign material from a spreadsheet data base
is this a feature script capability? if not, then is there another way of automating material assignment from a data base like excel spread sheet? say my spread sheet has two columns: part numbers & material and my assembly in onshape has also the same exact part numbers.
-
How to move a part using BodyType.MATE_CONNECTOR
How can I move the cube to the end of the cylinder? annotation { "Feature Type Name" : "Transform" }
export const myFeature = defineFeature(function(context is Context, id is Id, definition is map) precondition { // Define the parameters of the feature type annotation { "Name" : "My Query", "Filter" :…
-
[New] Fill gaps FeatureScript
Easily identify open gaps in surface bodies with this new custom feature with option to automatically fill the gaps and create a solid part. https://cad.onshape.com/documents/ce40596b860ab50d657e1a25/v/93eddbbe03dde1a35dcb3d19/e/c40a2b405f618e4760ef6ebb Thanks to @kevin_o_toole_1 and a few others for the guidance!
-
Variable WORLD_ORIGIN not found Variable Z_DIRECTION not found
Why is the code broken?I do not get it const lineToRotateAround = line(WORLD_ORIGIN, Z_DIRECTION); //????????? const angleIncrement = (360 * degree) / MyCount; var transforms = []; var instanceNames = []; //definition.count -> MyCount for (var i = 1; i < MyCount; i += 1) // Iterar de 1 -> (definition.count - 1) porque ya…
-
For (var i = .. Sketch and Plane and Circular pattern
How could you create a with a "for (var i = ...." a Sketch in each plane. And how Extrude each Sketch. jhljlñkjñl var sketch2 = newSketch(context, id + "sketch2", { "sketchPlane" : qCreatedBy(makeId("Top"), EntityType.FACE) }); for (var i = 0; i < 5; i += 1) { var miPlane is string = "plane" ~ i; var Circle is string =…
-
How can I use profiles that are not user defined in the loft feature?
I created two profiles in my feature script and now I want these to be used in the loft feature, is there a way of using them? like profile is from sketch 1 at point (x,y)? or maybe someone could just direct me to a script that demos this if its easier? Kind regards, Darren Lynch
-
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…
-
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…
-
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…
-
Examples of functional code of simple small operations.( Feature_Script)
Hello, I'm new with this Feature_Script, and I can not hole a geometry. Before putting this post I tried to find an example. The documentation of Feature_Script is confusing to me. As a user I am missing examples of functional code of simple small operations. It would be wonderful if these examples were discussed in…
-
help with guidance in a feature script for will solids with patters like lattices
Hello Looking for some help from the feature scripts masters. After
a conversation with someone from the support team, he told me that a feature
like this would be possible to do it and as I have no idea/experience with
feature scripts coding I would love some help/guidance/recommendations to where
to look for writing my…
-
Replicating Offset behavior in FeatureScript
I'm am developing a feature allowing me to automate the creation of a spline representing the profile of a slice of a boat hull. Is there a way to programmatically offset the spline as we can do it in a Sketch ? This should allow to give some thickness to the profile. At the time, I haven't been able to find a suitable…
-
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