featurescript
Discussion List
-
Pipe Hole Feature gives the resulting part with a hole different IDs
I created a Pipe Hole feature that allows selection of a pipe part or a feature that created a pipeline and then also select a wall to penetrate. The feature creates the hole so there are no interferences between the pipe and the wall and it eliminates any wall that was inside the pipe. The problem is that the id of the…
-
Dividing an edge in featurescript
I want to place a specified number of sketch points on even intervals along an edge in featurescript. I have done the slot tutorial but i need more understanding on these subjects:Determining the length of an edge in featurescript placing an sketchpoint on the edge in featurescript. It would be great i i was able to extend…
-
Trim previous sketch entities with FS?
I'm working on a feature that—among many other steps—copies and trims some existing sketch curves. I want the output to look and behave just like a normal sketch entity. I'd asked previously about whether we can do something like "use" to convert an existing entity into my sketch that the feature is making (was told no).…
-
FeatureScript naming complete parts
Moving on to assembly I was renaming the default Part 1 value of everything. Question or request to rename a completed part, for example in the brick or spur gear, it creates a finished body, the default Part 1 isn't very descriptive. Granted it could be subtracted to get the negative, but including/adding that subtraction…
-
How to select the same face of a copied part with opPattern?
A quick question, the user selects a face and I make a copy with opPattern of that whole body to manipulate. I want to select that same face on the new body. How can I do this? I tried qMatching, qAdjacent, etc. No luck.
-
TooTallToby Material new Featurescript
*Texte en français au bas --------------------------------------------------------------- Hi everyone! I just created a new version of the FS "TooTallToby Material" where you can see mass in both units (grams and pounds) at once. Now you can change only the length units and skip the mass units change to find the correct…
-
Feature Scripts: One large script, or Several small scripts for variables across multiple documents
I'm using scripts to make variables for every aspect of a huge project (Over 2000 variables and counting). I'm wondering if there's any performance difference between having all of these organized into 3-4 script files or 20+ script files? Some background: I'm designing a large structure that I've been working on for 4…
-
Why can't I pass a value with units to an opThicken
Why can't I pass a value with units to an opThicken unless it's passed in as a variable from function parameter definition: https://cad.onshape.com/documents/c8eef2271809c4293325c9b1/w/d82cceae829e190d1649e512/e/287a2ff37d6f3ee70d59456f (for onshape team only). see line 61 to 69 and note that this all works with no errors…
-
Slide Bézier Control Points?
I managed to create this using a bunch of constraints which I suspect are not generalizable, but here's the concept: I've seen in other CAD systems that there are tools to "slide" the control points along a Bézier in a way which creates as little change to the shape of the curve as possible. I've looked around for research…
-
How to accept wonky strings as featurescript inputs?
Hi! I'm writing a Featurescript that will (hopefully) take an SVG string input, and parse it/convert it into Onshape sketch features, letting users essentially import SVGs through a configuration input. (This would let you integrate configurable logos into your designs, where a user can just upload an SVG in string form,…
-
Reset Name of part
How do I reset the name of a part so that I can configure it using featurescript? EDIT: Also reset any of the other properties.
-
evCollision Clashtypes?
Okay so I'm playing around with the evCollision command but it seems odd to me that there is 8 "clashType" enum values but no matter how I arrange my tool and target bodies I can't seem to get all 8 outputs. So far I've figured out how to get: INTERFERE, ABUT_NO_CLASS, TOOL_IN_TARGET and TARGET_IN_TOOL. For some reason…
-
FS Modifiable Body?
What according to feature-script is a "Modifiable Solid Body" ? This is used in "qAllModifiableSolidBodiesNoMesh()" and "qAllModifiableSolidBodies()".
-
transformResultIfNecessary?
transformResultIfNecessary(context, id, remainingTransform); I've noticed this line of code in a bunch of the std library (31 of the 192 tabs). I don't remember this being all over in the past. Reading in feature.fs there's a large comment about how it enables feature based patterns. Are there any tricks to using this line…
-
Global Variables - Feature Script
Can anyone offer advise on the possibility / components for / method of making a global variable using FeatureScript?
-
"Essential Mathematics for computational design" - but for Onshape?
It would be really great if there were an Onshape/Parasolid/FeatureScript version of documentation like this that exists for Rhino. It's been released as a PDF book in 4 editions over the years, and also as the linked website. Much of the math and concepts are basically the same for Onshape as for Rhino (both being 3D CAD…
-
Delete internal volume featurescripts
Hello, I am calculating buoyancy of an assembly and I am wondering if there are existing featurescripts that can help automate my process. I begin with my assembly and use Create part studio in context using the assembly origin as the origin of the new part studio. I then use Transform -> Copy in place to grab all the…
-
New FeatureScript - Point Derive
Hello all, I'm happy to release my latest FeatureScript, Point Derive. Point derive allows users to quickly derive parts into new positions in a part studio in a manner similar to @ilya_baran's Super Derive feature, but also adds powerful Point functionality. When a part is selected to be derived, any mate connectors which…
-
FeatureScript that generates a cube by specifying desired mass (carbon steel)
Hi everyone, This is my first FS ever and I developped it just for the fun of learning FS. The feature builds a cube by specifying the desired mass (in kg). The density used is for carbon steel. There is an option to center the cube on the center point in the PS. I already have improvements ideas such as: * * Units…
-
How would you design an SVG export app/script/tool?
Step 1: The user selects a number of parallel faces in the Onshape UI Step 2: ??? Step 3: Profit! (Get an SVG you can take to your CNC workflow of choice) The standard workflow recommendation for small CNCs is "Export DXF, import into Inkscape, merge the paths, re-export to SVG" but frankly that's a pain in my ass. There…