-
Trouble Patterning a FeatureScript
Hello all, I've been working on a new FeatureScript, and have it mostly working, but now I'm having a little trouble getting it to work with the Pattern tool. I found the "getRemainderPatternTransform()" and "transformResultIfNecessary()" functions and have added them to my code. Now when I try to pattern my feature, it…
-
FeatureScript Editable Sketches
Is there a way to generate Sketches in FeatureScript in such a way that they are editable? with the newSketchOnPlane() and skSolve() functions I get an immutable sketch. Thank you very much.
-
What's a complete API call to /partstudios/../featurescript look like?
I think I have all the puzzle pieces for making an authenticated api call to evaluate a featurescript function, but I'm having trouble with cryptic error messages like "Error in input". I get the same error if I make the call via the API Explorer (using API key/secret) or from command line (using OAuth). Here's the raw…
-
BOOLEAN IN UI
I have 2 boolean selection in UI. How to inactivate other boolean if user selected other one?
-
"UIHint" : "HORIZONTAL_ENUM"
Can somebody show me how to use this?
-
Manipulator Please explain
This is an FS library sample code and I tried testing it . I commented out line 57 to 64 but it doesnt change the UI and no error too. Why? https://cad.onshape.com/documents/62ab169994fa64d9d0d8e435/w/96ebcb0923327e87598444ba/e/bcf5593610f1bb81dc98d486
-
Plane Question
This cant be extruded because of evOwnerSketchPlane Do I have to create a plane for this?
-
worldToPlane Question
How come my skrectangle didnt produce a 1x1 inch size using worldToPlane ? https://cad.onshape.com/documents/583340f98c282b104bd800ee/w/b3c16d2af1095e95dd57d4c2/e/91ff8b48a67360edfc87cbd1
-
evDistance for plane and a point
Can i know the distance between a plane and a point using evDistance?
-
Project/Convert line in FS
can FS use project/convert line?
-
Vector coordinates help
Hello all. My mortise and tenon script is still a WIP and I have ran into yet another problem. I am using the corner of a rectangle as the reference point for an skRectangle() function. Suppose the coordinates of the corner are (-50, 50)*mm in the x-z plane, and I want to put a point that is 10mm across and 5mm down, I…
-
question mark meaning
what does a question mark means in FS coding?
-
Does Onshape have an automatic constraint functionality similar to Inventor?
So, let's say you've got a complex .dwg that you just want to import because you're too lazy to simplify it... in Inventor you'd just autoconstrain the whole shebang and you're off to the fully-defined races... and can delete constraints as you need later on. Anything like that in Onshape, and if not, might it conceivably…
-
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…
-
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,…