-
holes to points in circular pattern
i want to do holes. i created points in a circular pattern as the center for the holes. no i have difficulties defining the locations and the scope in fs for the holes. const anzahl = dimensions.Rotation; for (var i = 0; i < anzahl; i += 1) { const t= rotationAround(rotationAxis, (2*PI* radian) * (i/anzahl) ); const…
-
feature script - extrude's entities queries
https://cad.onshape.com/documents/48ec052b1145ddd86705ef78/w/91cdf3007cb145b3e5c7fbbf/e/305d955b8b71be5086653bad I am trying to create a script for springs. In partstudio it works ok with changing variables. Now working in feature script , I am not able to find the right entity-query I need three bodies for the later helix…
-
Call skEllipse(Id (array), string, map) does not match skEllipse(Sketch, ..., ...)
Im have some difficulties with my first Loop. I'm trying to create ellipses on different sketches. heres the code I want the ellipses to be on different sketch heights, but they are all on the same heigth. Any suggestions?
-
LOFT_SELECT_PROFILES error
I'm trying to create a loft from a defined face to an created point. I always get the error LOFT_SELECT_PROFILES. //Loft var top = (normal * definition.Height) + origin; const vertexID = id + "topVertex"; opPoint(context,vertexID,{point : top}); var topVertex = qCreatedBy(vertexID, EntityType.VERTEX); var profiles =…
-
Relif Cut
Hello, is there an automatic function to make a free cut for holes that are too close to the bending edge? Once constructed an example. https://cad.onshape.com/documents/17763e1bca9abe8f571334e7/w/4e6c4b1da9827dde10ae8531/e/209f66484bca7a61ca701914
-
Call user created scripts in another script
If I have written one script called custom_axis, and am now writing a new script. How could I call custom_axis in this new script? I have tried entering custom_axis in the hopes ti appears in the drop down list, but it doesn't. How could I do this? Thanks Lee Hesketh
-
Customized toolbar
Do we have capability in OnShape to create a customized toolbar as in CATIA? I tried featurescript but could create customized commands not the toolbar. Appreciate your help in this.
-
How to get the "Part_Number" with FeatureScript?
Hello Everyone, I need to name my configurations parts automatically. The "Part_Name" should be "Part_Number" + "Part_Description" The reason is when I export the part as a STEP-File it should contain the Number and Description in the File Name. I managed to automatically create the "Part_Description", but I can't request…
-
How to use the Beam Profile Generator
How to use the Beam Profile Generator to add a new profile to the look Up Table in the Beam Profile tab?
-
New FeatureScript: Pocket Holes
Hi everybody, I would like to share my first FeatureScript: Pocket Holes. The feature is very straight forward: * Choose entry face * Choose exit face * Select vertices where the pocket holes will be created * Select thickness of part that will have the pocket holes You can find the FeatureScript…
-
functions question
-
Feature Script: How to set the "oppositeDirection"-Tag for extrude?
Hey! I'm starting with feature script and work on a small script that simply needs a thoughhole. I ask the user for a point (around which I draw a circle) and a face to which the hole is going to. This part of the script looks like this: annotation { "Name" : "Vertex for center", "Filter" : EntityType.VERTEX,…
-
Is it possible to intersect path and plane without using opPlane and deleteBodies
The below seems inefficient. function CurveIntersectPlane(context is Context, id is Id, curve is Path, plane is Plane){ var ppPlane = opPlane(context, id, { "plane" : plane, }); var r = evDistance(context, { "side0" : ppPlane, "side1" : qUnion(curve.edges) }).sides[0].point; deleteBodies(context, id + "delete", ppPlane);…
-
Is it possible to check if a point(x,y,z) is on a surface or in free space?
i'm making a script that genrates some holes automatically.. I'll need to check if the polygon i'm extruding is in free space or on a surface? is that possible and how?
-
Creating polygons with a for loop?
I would like to create multiple polygons with a for loop depending on some info from the user, right now i just create one at a time because i cant iterate an id name? Now i go like: skRegularPolygon(sketch, "polygon2", { "center" : pointArray[2], "firstVertex" : vector(pointArray[2][0]+(4)*millimeter,…
-
Finding a meeting point(x,y,z) of two lines?
I got two lines defined by the user, and i want to return the point where they meet... var buttomLine = evLine(context, { "edge" : definition.buttomSide }); var leftLine = evLine(context, { "edge" : definition.leftSide }); i tried using their origin, but they dont have a cummon coordinate. How can i find the meeting point…
-
NEED SOME EXPLANATION
-
Use Hole Callout on holes created in FS
Is there any way to create holes in FS such that they can utilise the Hole Callout feature in a drawing?
-
How to extrude skRegularPolygon ?
I made a a sketch, and on that sketch a polygon: var poly1 = skRegularPolygon(sketch, "polygon1", { "center" : pointArray[0], "firstVertex" : vector(pointArray[0][0]+(2.5)*millimeter, pointArray[0][1]+(2.5)*millimeter), "sides" : 4 }); I want to extrude this polygon, but the function above returns a map and the opExtrude…
-
FeatureScript Material Selection
Thank you so much for adding setProperty to FeatureScript! Is there anyway to set the PropertyType.MATERIAL from the Onshape material library? Or do I always need to define the name and density myself using the material() function?
-
NEED HELP ON FS
-
Unexpected operator in if statment
I am sure I am missing something really obvious here but I have the message below: The Query it relates to is: <div> annotation { "Name" : "Width"} </div><div> isLength(definition.width, {(millimeter): [200, 800, 1000]} as LengthBoundSpec);</div> I have tried all combinations of with and without units, dividing by units…
-
Either or selection of edge or face in featurescript
Sure I am missing something really obvious here but I cant see how to allow selection of either a face or an edge in featurescript.
-
Custom Beam Profile
So after adding the new profile to the code, how do I use the feature in my documents, all that shows up it the original beam feature, the edited one only shows up in the document which I created it in.
-
create a variable by selecting points / importing variable from derived object
Hi, I want to create a variable from a derived object by selecting 2 points of the derived object and calculating length I'm new to onshape and the variable features and the way some tools like patterns works or simply extrude works is really awfull, variable can't be shared and so on... I would like either to import…
-
Tagging faces through feature script
Hi there, I'm currently working on a project with the following pipeline: 1) Create a 3-D Model using OnShape 2) Export this model as a Parasolid object 3) Convert the Parasolid to a tetrahedral mesh 4) Run a series of simulations on the mesh, contingent on various boundary conditions My current issue is that the boundary…