feature script
Discussion List
-
Get all faces of a part
Hi, how could I get all the faces of a body? I have got the body I need, I just need to iterate through the faces to find the smallest area and use that in a distance calculation. The body is a simple cuboid. Thanks Lee Hesketh
-
Query for specefic edges that are looped around faces?
Hello, still having difficulty with featurescript! I am trying to query these edges from a loop of faces: I have already got the faces, but when I use qEdgeAdjacent(), it selects the end edges as well. I don't need these as I am hoping to use the edges as arguments for a fillet operation. How could I query this? I have…
-
regenError message not displayed in dialog tooltip
I'm trying to modify the auto layout tool to improve the error messages and a few other issues. I'm trying to use regenError to display a useful message in the auto tools dialog box. (e.g. when the title goes red you can hover to see the error details). My reading of the documentation suggest that the error passed to…
-
opExtrude failing with a query from opMergeContexts
Hi, I have a feature script ("Wren") that import a part studio ("Fin module") and try to extrude it but opExtrude throws an exception with the query form opMergeContexts. The script and the part are here: https://cad.onshape.com/documents/03f4ac3d6bb09fa192294621/w/695b19824c4731f7a79d0f9e/e/753184455e13c8c9c1412d4a
-
What is the API call to execute FeatureScript?
It has been suggested that it is possible to make an API call that will invoke a FeatureScript function in a particular document. I am having a hard time finding the specific call in the API Explorer. Does anybody know the specific call I should use? For more context: I've started to build an integrated app that will do 2D…
-
Exponential horn along spline or collection of edges
Hi. I am trying to create a model of a back loaded horn speaker. This basically means calculating a horn shape according to parameters for the speaker and then try to fold this horn in order for it to fit inside a reasonably sized box. Traditionally this has meant producing cases looking like this: But since more and more…
-
question mark meaning
what does a question mark means in FS coding?
-
Simplify custom script...possible?
A colleague has created a FS to apply custom cut outs but when I use it I have to pick about 8 references. This is a bit tedious, I wonder if the script could be simplified to pick only 2 or 3 references. I can share the code with someone interested in helping out but you can understand that I can't make it public.
-
How do I get the FeatureScript Beams to recognize the new profiles that I creat?
I made a copy of the Beams script (named it FeatureScript ModifledBeams), Added the profile for 1" X 1" to the profile list, changed the "beamProfileTable" constant to "beamProfileTableMod" in both the beam profile and beam feature tabs. When I load the ModifledBeams into the document it does not show the 1X1. If I open…
-
Querying points on a curve
Hi I am currently working on a script to auto spline between my aerofoils, but I am having trouble's. I tried querying the vertices adjacent to the profile, however this only gave me the leading and trailing point. I have now queried the upper and lower splines and attempted to do a line intersect but obviously a spline…
-
ROUND CORNERS
How can i round the corners of skrectangle or closed sklinesegment?
- help on evDistance
-
how can i write this in FS
dim len as integer len = 1
- how to get dimension?
-
Defining appearance
Is it possible using Feature Script to change or define the appearance of a part? For example, colour?
-
How to make extrude solid not surfaces?
Hi, what I need help with is I have performed an opExtrude() function and then used qCapEntity() to get the end face. I then have another opExtrude() to extrude the whole face another 3mm. However, the resulting geometry is a surface not a solid and I don't know why. Also if this wont work, how could I use the offset face…
-
skRectangle error when part's rotated
Hi there. I have a script that generates mortice and tenon joinery however I have some problems. It works fine if the parts face that the tenon protrudes from is aligned with the x axis. The problem is when it aligns with the y axis. How I have got it to work so far is the user selects two adjacent faces and then the…
-
Get face that shares a vertex
Hello, I need a piece of code that gets a face that contains a specific vertex. I already have the vertex specified, I just need the face such that the vertex makes one of its corners. Any Ideas? Thanks Lee Hesketh
-
Select adjacent ends given two faces
Hi everyone. I need to query for the ends of a rectangle given the user selects two adjacent faces. How could I do this? Thanks Lee Hesketh
-
Can i use script of created part for making custom feature script?
Can i use script of created part for making custom feature script?
-
Automatically referencing geometries as input for new feature through API
Apologies in advance for the abstract problem description. I hope I'll be able to explain it somewhat properly. If not, let me know what information you're missing. My problem is as follows: Let's say I have two Feature Studios. One which creates a straight line, and one which creates an arc. * I need to be able to…
-
Recommend making a tutorial for debug
Hi, I have been learning Feature Script for the past few days. It took me a while to know that debug existed and about 30 minutes to figure out how to use it. Since learning how to use debug, my learning rate has accelerated significantly. I would recommend making a 30-60 second video tutorial of how to use debug and…
-
SVD
I have a vector which is the normal to a plane to create another plane x distance in the normal from the original plane I want to find the unit vector of the normal. I wanted to use svd but I can't figure how to use is where do I put the 'u' in svd? my code looks like this: //Make Plane normal<div> var centerPlane =…
-
Human Model Feature Script
I'd love a 98 percentile human model that could be configured/set into various positions. I think it was mentioned here on this forum some time ago that Catia had something like this. Has this been done? This maybe something someone could tackle with FS. Beyond me but I'd defiantly use this if available. @dave_cowden what…
-
exporting variables from one feature studio to another
for example if i have a variable as var pp = 1+5; in 'feature studio 1' and i want to use this variable in 'feature studio 2' as var pp1 = pp+1; can this be done? as in exporting values and quires from one feature studio to another? if so how should it be done and what is the syntax of coding to be followed? I'm kind of a…
-
Many points and skFitSpline
Hi I am automating a profile connecting many points with skFitSpline and the resulting spline misses most of the points specified. the snippet of code is as follows: skFitSpline(sketch1, "camberSpline", { "points" : pointsCamber }); where pointsCamber is an array of many vectors. any ideas as to how i could improve this…
-
Deduce a existant diameter or project a face
Hello, I would like to make a new Feature with FeatureScript. I would like to automatize the creation of screw thread. To do this I need to create a sketch on a surface. On this sketch I have to project the circle, or at least know the diameter of the screw. For the moment, I could create a sketch plane with a circle but I…
-
FeatureScript and students
Hi, As a Design and Technology College teacher from Y7 through to Year 12 (Australia) I was wondering if a 'Feature Script' could be developed/made to 'Only' allow certain comands to be visible so that young students could focus on the skill set on 'display'?....or are there ways to 'turn off' skill sets? ...by the way…