-
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?…
-
Rounding Calculated Variables to Pattern number of Instances
Can anyone offer any tips for how to round off or convert calculated variables to integers so that the calculated variable works for patterns?(number of instances patterned?) Surely this should be fairly simple in FeatureScript but not sure how to approach it.
-
How to using FS to create a quick sphere
I tried using FS to quickly create a sphere but it still not work. where is the problem? thanks https://cad.onshape.com/documents/578f89d3e4b0cdd13940cfe7/w/92807c44d555c353a9b7b4b3/e/d9b77e1c239e6135100324f8
-
Featurescript: Select all outer faces adjacent to a seed face
I've tried all sorts of variations of qLoopBoundedFaces, qFaceOrEdgeBoundedFaces, and qEdgeAdjacent... no cigar. For example, given the start face of an extruded ring, what combination of queries will retrieve the cylindrical outer surface? It seems whatever I try ends up with all the surfaces of the extrusion. This would…
-
Revolved Curve FeatureScript
I've been playing around with the opFitSpline function. One of these days FeatureScript will support on the fly parsing of user entered expressions. In the meantime, this FS will generate some fun 3D curves. https://cad.onshape.com/documents/5780f7f7e4b0b759b32cbbb9/w/6ae742fb5da12d92cd4e4ddd/e/aab0024ce36028e8b6ef4faf
-
Creating a super elipses featurescript
Super elipses for reference: http://demonstrations.wolfram.com/VisualizingSuperellipses/ I'm trying to create a superelipses featurescript, but am having some trouble getting the shape to behave the way I want. The two solutions I can think of are to 1) make geometry and then constrain it (so that the corner fillets are…
-
3D splines can't be extruded or lofted
It seems that 3D splines created in FeatureScript can not be extruded or lofted to create solids with them. When drawing closed curves with opFitSpline I can't even select them in the Extrude command. I am doing something wrong?
-
Display of enum for feature type in custom features
Is it possible to get a feature-type enum to display as "tabs" rather than a drop-down like it does for the native boolean operation? I was able to do this in a custom feature if I declared a BooleanOperationType enum and imported onshape/std/booleanoperationtype.gen.fs at the top, but not if I defined my own operation…
-
FeatureScript O-rings
Made a FeatureScript to automate the modelling of O-rings. Enjoy! Amateur programmer here :) https://cad.onshape.com/documents/ae242486af63d55695d994a6/w/bd934a52d0bc030cc75b310f/e/6393ddee213a083563197321
-
opDeleteBodies doesn't remove outline
Hi, After creating a sketch in FS and (for example) extruding it, I remove the sketch with opDeleteBodies. However, the outline (edge) of the sketch still remains. What am I missing here? You can see it in "Nuts & Bots Generator"…
-
Stopping short with an Extrude Up_To_Surface
I'm working on a feature which will remove material from a model to make a poor man's linear bearing for 3d printed parts. I've managed to construct half of the feature properly, however I'm having trouble removing some additional material from the inside of the hole to reduce friction. In the model attached below (V1) I'm…
-
No functions for line manipulation?
Hi, I've haven't found any functions for manipulation of Vector and Line objects. Something like: var line1 = line(vector(x1, y1), vector(d1, d2)); var line2 = opRotate(line1, vector(p1, p2), 90 * degree); var vector3 = opIntersection(lineA, lineB); Am I missing something or do I really have to write them myself? I know…
-
Problems with skArc
Hi, I'm creating some corners with skArc but some are ending up inside-out! I'm using the getArcMidPoint function posted here earlier. All the small arcs in the picture below should be "outies" and the large center one "innie". Here's the code for the lower left one (ll and ur are vectors) start = ll + vector(0 *…
-
Creating acircular pattern in featureScript
Would someone be kind enough to look at the script in this document https://cad.onshape.com/documents/623b04759dbfa9159178fe48/w/3f75f7adc024168001e48971/e/ebff95d2dd43547b3b99a055 and point me in the right direction to fix the circularPattern. I am trying to make a flange for joining sections of pipe
-
FeatureScript and Assemblies?
Im trying to use FeatureScript to replicate an automated process I have built in Proe using trail file. Id like move the core build process from Proe into OnShape. The Proe trail is building a PCB from an intermediate text file (IDF) that describes the board outline, slots, and holes and also includes the components and…
-
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…
-
Part Draft
So, my first stab at FS is going to be a "Part Draft" feature. I just want to query for a neutral plane, and a body - and I want the feature to split the body with the plane, then draft both sides. I figured I'd start with the draft, then incorporate the split. I could get the draft working when I queried for the faces,…
-
How do I query for just the inside surfaces?
For example, I have a pipe network. I want to query for all of the inside surfaces of the pipe, and I don't want the outside surfaces or the end faces of the pipes. Another example: I have a cavity (like a mold tool), and I want to query for just the inner surfaces. Thanks!
-
Slot Tutorial Not Working
I was really hoping to get through a tutorial without asking for help... So much for beginner's luck! As soon as I add the Extrude feature in FS, the slot feature goes red in the part studio. It's does not want to extrude the surface. Did this happen to anybody else? Here's the screenshot: Probably some n00b mistake...…
-
First project & request for more examples
Hi all, I'm starting to fiddle around with FeatureScript, and have an idea for a feature that I'd like to build out. I've run into some trouble, and would appreciate any suggestions folks have. My Idea: Briefly, I'll explain what I'm trying to do. I want to create a feature to automatically split cylindrical features with…