featurescript
Discussion List
-
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?
-
Use opBoolean() on all parts that contain a point
Hi how would I use opBoolean() to remove material from all parts that are touching a part? I have currently used qContainsPoint, with qEverything() as the subquery, then using qSubtraction() to filter out the part itself. This works in finding the correct parts, but when I use the variable I have assigned to these parts in…
-
Unable to fillet an existing object - Need help
Hi, I am unable to fillet an existing object, it always throws up errors and ive tried everything to get around this such as trying to draw arcs with lines so i wouldnt have to fillet after i extrude to no avail. Here is my code: var length = 100*millimeter; var depth = 50*millimeter; var width = 500*millimeter; var…
-
Use a vertex in skRectangle()
Hi, how could I use a vertex's coordinates as the "firstCorner" coordinates for an skRectangle() function? Am I right by thinking that it must be a 2d vector and I could get it since I am using evVertexPoint, I could use vertexPoint[0] etc., but that only works if the part is in the correct orientation? Thanks Lee Hesketh
-
paid featurescript functions
Hello, Nowadays, from day to day many new featurescript tools appear from OS users. I think it's a great thing, we can learn from each other a lot. But it seems some users made their tools as paid version in the future, but the tools sometimes contain so basic features - like creating curves from external point data -…
-
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
-
Parameter space vs World space when using evFaceTangentPlane
I'd like to modify @jon_sorrells' Curve Pattern FS to accept a reference surface. The intention is to maintain the position of seed features/bodies/faces relative to the face normal at each incremental point along a curve. The problem is I don't see a way to generate a normal vector at any given point on a surface.…
-
Create sketch in middle of part
Hi all. I have a script where the user selects a face, then using qConvexConnectedFaces twice to select the ends. I have then found the midpoint of each of those faces and used them to find the midpoint of the part. What I need to do is create a plane at that point parallel to the end faces and then create a sketch. How…
-
Splitting a wing into ribs on iterations.
Im not getting any errors but also not getting any results, the idea is to split a wing into ribs and delete the bits in between, however user can specify rib number and thickness etc... var halfrib=Ribthick/2; for (var i = intervals; i < Length; i += intervals)//outerloop for each rib { for (var j = -1; j == 1; j +=…
-
skfitspline
Hi, so I'm writing another script I copied and pasted a bit of code form my other script: skFitSpline(sketch1, "UpperSpline", { "points" : UpperCoordinates }); where: UpperCoordinates=[vector(1,0.0130)*meter, vector(0.95,0.0230)*meter, vector(0.9,0.0396)*meter, vector(0.8,0.0732)*meter, vector(0.7,0.1039)*meter,…
-
Featurescript: How to create a line between two points (vectors)
How do I create a line in FS between two points (vectors), not using sketch points? since line(point,direction) only offers a direction, would I need to calculate the direction somehow, and how would I do that?
-
FeatureScript: How to query (not in viewer!) points and lines to create planes?
I'd like to create a plane in FS using either: * three points which I create as variables, vector(x,y,z) * meter * a line (more or less an axis, since it seems infinite) created using line(point,direction) and a point how do I query these points and lines so that they can be used? Note that I want to query these in FS; not…
-
Get distance between midpoint of face and edge
Hi there. How would I get the distance between the midpoint of a selected face and an adjacent edge?
-
Plane Axis orientation
@ilya_baran Lets say you have created a plane "Plane 2" as shown below. now as you see the plane created in in the same axis orientation of the Global X and Y axis even tough I have used the edge of the extrude to define the rotating axis. I want the plane to be oriented in such a way that the axis system of "Plane 2"…
-
Multiple use for imported parts
Okay, I'm going to try and explain this to the best of my ability (<--Feel like I've said that before?? :/ ) So I have a profile that I am importing in to a FS..... easy enough... Then, I turn it in to a function. export enum sealantProfileID { annotation { "Name" : "1/16 inch" } F72Dq47pUtYbudg_0, annotation { "Name" :…
-
FeatureScript Extrude Help
I'm working on a new FeatureScript and could use a little help. Inside of the script, it is creating a sketch and then using the extrude function to create the feature. I'm using the 'extrude' function instead of 'opExtrude' because I also want the option of adding a draft to the feature at the same time. I want the user…
-
Rib FeatureScript Modification
Hey All, I've made a modification to the Rib FeatureScript and thought I'd share it with everyone. The original Rib feature worked great, but sometimes I need to create two ribs with a specific distance between a face of one rib and a face of another one. It's a lot easier to do this within the sketch for the ribs, so with…
-
Guidance on planeToWorld and auto placing
Hello everyone, I am building on the collaboration of the 'Table Creator' I'm taking it to a different level. This time I am building a wall and placing a picture on the wall. I have most of the code already written, but if you look at what it creates you'll see that the picture ends up out in space..... I know it has to…
-
Target Audience for Help files.
Hi folks. Firstly this is not meant to be a winge although it may come across as such. Sorry for that :) I think you're doing an excellent job with regards to tool tips in the regular interface. (Hover over a button an explanation comes up, hover for longer a deeper explanation is given.) I wonder if there is a way to…
-
Revisioning public Featurescript - Public/Private Versions in one document?
Hi folks. I'm sure this has been covered before but I can't find the post I was after. Sorry if it's old ground. (Question 1) Lets say I have a document containing a FS that I've made public that I now want to develop further. The workflow I envisioned was to have the latest stable revision made public, and with further…
-
Parametric Surface from f(x,y)
I'm trying to build upon the Parametric Curve FS to create a Parametric Surface. The intention is to be able to input a function Z = f(#x,#y) and have that create a lofted surface. However, I'm running into problems getting the z equation to accept 2 inputs (x,y). @ilya_baran, @kevin_o_toole_1, maybe one of you can take a…
-
automate STL Export
I'd like to have a one-click-solution for exporting the selected body as an stl with fine quality, so that I just have to type in a name for the file. sadly, I have no programming experience whatsoever. Has someone already done such a FeatureScript? Thanks in advance!
-
set points coincident
while not satisfied with the dxf import: https://forum.onshape.com/discussion/4356/imported-dxf-problems#latest i would like to try it with a featurescript solution: https://cad.onshape.com/documents/150b4b8582755bae310054ab/w/e7f86ea4d976b93e892239e1/e/ae4e6be500f0024054ffe3f8 first, why will the sketch entities…
-
how to evaluate extrude direction so it can be used in a transform
Hi folks. Hopefully an easy one this time. I'm creating a body using an extrude from a sketch. Having made it I may wish to transform it in the direction of the previous extrude operation. I can use the qCreatedBy query to grab the body for the entity parameter but am having difficulty evaluating the extrude direction for…
-
Using FS can we create a sketch on a face of a part or only on Planes?
Hi Folks. I'm playing with my first FS. Using FS can we create a sketch on a face of a part or only on Planes? More broadly I have an input of a single vertex (from a sketch on the surface of a solid part). I wish to create a sketch here then add some geometry to work with. What's the easiest way to accomplish this please?…