-
Weird Extra Mate Connectors Added by addInstance()
I have a featurescript that inserts a part from a configurable part studio at a specific mate connector. The feature brings along any mate connectors in the part studio as well. I'm using an instantiator with a partQuery specified. Like this: const instantiator = newInstantiator(id + "blockBody", {"partQuery" :…
-
More Direct Documentation for updateSheetMetalGeometry?
I've got a sheet metal tab and slot feature that originally was written to generate geometry using some more obvious methods that didn't require me to understand the intricacies of the black box of the sheet metal functions in Featurescript, but unfortunately due to a bug with Move Face and Modify Joint breaking edge…
-
Can FeatureScript use a document name to set part attributes?
I recently made a FeatureScript to help color code parts according to a company SOP. It basically has a drop down of the part type and then sets the appearance of the part accordingly. Is it possible to have FeatureScript read the name of a document (the documents this would apply to all follow a strict naming procedure)…
-
Referencing Array Parameter Index in Item Label Template
Is it possible to access and include the index of each array parameter in its label? Something like "Item label template" : "Line #index" ?
-
Emojis within feature notifications 😀☠️💣
Nothing new, but I would like to point out that we can put emoji within feature warnings! .
-
opTransform with sketch text will fill holes.
This image shows what happens when extruding (with opExtrude) after a opTransform (in red) versus directly (in blue) . Here's a simple code to reproduce the error : ``` const targetPlane is Plane = evPlane(context, { "face" : definition.target }); const planemap is Transform = transform(sketchPlane, targetPlane);…
-
[NEW] Keyway Groove FeatureScript
With our recent release of Keys to standard content I created a Keyway groove custom feature to automatically cut the appropriate size grooves for a given shaft or hub diameter. ANSI and DIN included! Add to your toolbar:…
-
Rotate entire string of text on a plane
I have completed placing the text in the sidewall of the tire with the FeaturScript Surface Text, but I would like to rotate it so the "G" begins where the "D" in the word radial is. Not sure if the Wrap Tool will accomplish this. Thought I would put it out there before I went further.
-
Two point generation for imported parts.
I want to do a two point generation system for imported parts in a featurescript I'm making and I previously did it like this if (definition.generationChoice == generationType.TWO) { opExtrude(context, id + "hexShaft", { "entities" : qSketchRegion(id + "sketchOne", true), "direction" : dir, "endBound" : BoundingType.BLIND,…
-
How to extrude imported parts with a featurescript
I am making a featurescript that generates some parts to make the CAD process faster for my FRC team and I'm not sure how to extrude an imported part. I want to make it so that you can change it's length based off a definition.length inputted earlier in the featurescript. This is my first time doing a featurescript so the…
-
IDE Broken in Featurescript
I was programming and suddenly I noticed after a short break my IDE no longer showed all the usual options it should and sometimes it doesn't let me access things I should like enums that have been declared higher up in the code. screenshot of it not doing definition for a if (definition.X == Y) statement and only showing…
-
unexpected selection behavior when filleting the results of a self-repeating custom feature
i'm not quite sure what to make of this. the lower-right hole is the one based on the first item i selected for my custom feature and that seems to be relevant here, and in other cases where i ran into this with the same feature. clicking the edge of the first instance selects both instances. deselecting the first does not…
-
Grasshopper/Dynamo in Onshape?
FeatureScript is an amazing feature of the Onshape system, but the barrier to entry is a little high. All the verbiage to get to the core of creating/manipulating geometry takes a lot of time to understand. If you don't use it all the time, it's easy to forget subtleties of the syntax and standard library. I'm also a very…
-
ChatGPT/Copilot for FeatureScript?
I've spent too much time over the past few days playing with ChatGPT. I've tried asking it about simple things in FeatureScript, and it just makes up code which may be more like Javascript - which is disappointing. ChatGPT supposedly doesn't know anything newer than 2021, which is also frustrating. In any case, it seems…
-
Custom Features Collection
I joined the Onshape design team in January of this year, having previously worked in NX for 11 years. At first, I was hesitant to get to know the software, but it quickly became apparent that beyond the built-in functions, there are also many custom solutions for different tasks. These are nice, but it is almost…
-
Defining Libraries for Featurescript Usage?
I have a WIP Laser Kerf Bend featurescript that's been on backburner for quite some time and I've based the implementation partially on @MichaelPascoe's Texture feature which includes a lot of pre-defined solids to choose from for pattern seeding. The way he accomplished his "library" of solids was a lot of manual…
-
Can't publish my custom feature
I just realised my frame trim/extend featurescipt isn't publicly discoverable (sorry, kind of new to OnShape). I've met all the requirements, but for some reason it's not detecting that I've used the feature in my example:
-
New Feature - Bridge Overhang (for 3D printing)
https://cad.onshape.com/documents/9db73769726a7c1968a9eec6/w/a94665f4983acd43414a91e8/e/f98a3b9885864c1f11d186d6 This tool lets the user print normally difficult geometry much more cleanly. Generally, when printing geometry with counterbored (or pocketed) geometry on the bottom, the resulting print develops a solid amount…
-
Export sketch as piecewise polyline.
It's been a while since I've written any featurescript. I'm looking for the following solution. I would like to be able to select N closed and open chains of sketch entities and with a provided tolerance tesselate them into N piecewise polylines and then either print them to the console or copy them to the clipboard. Is…
-
Custom Feature: Engrave
Link to Engrave I like to label all of the machined parts I possibly can with their part numbers and revisions so my coworkers can easily find them in CAD without knowing their location in a folder. Yesterday I released the Hershey Text function and this engraving feature is meant to pair with that in my almost finished…
-
Using a pressure parameter in feature UI, accessing Young's modulus from material properties
I'm working on a feature that will A: Create cross sections along a curve from a selection of bodies and B: to calculate the bending stiffness of each cross section, though this may beyond the scope of Featurescript. I am selecting bodies as part of an array parameter, and then extracting names and material properties in…
-
Custon Feature to concatenate custom property and part name
Can someone please guide me OR share materials to help me achieve the following: I have a custom property called BCP Part Number, I want to automatically transfer this number and concatenate it with the Part Name as per the below image. Such that the final part name is a combination of BCP Part Number + Part Name.