-
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.
-
Featurescript Dev Paid Contract: BOM Auto-Kitting Featurescript
I don't know if this is the right place to post this, so feel free to take it down if it isn't! I'd like to hire someone to write a custom feature script that will automatically take an assembly and create a 3d-printable "tray" with bins labeled with each parts part number and revision, where the bins are large enough to…
-
How do we find useful feature scripts?
@Jake_Rosenfeld posted a very helpful article about adding FS at the end of this discussion Jake or others - I have seen this question on forum before but I do not remember a good answer. I know FS is not intended long-term solutions to generally required functions. However, for now there is a lot of good stuff which we…
-
qEdgeVertex suddenly missing – related to default libraryVersion?
Hi everyone, I'm running into a frustrating issue with FeatureScript inserted via the Onshape API (from a Python-based workflow). Recently, my script started failing with an error saying the qEdgeVertex function is undefined. After some investigation, I found that the root cause seems to be the libraryVersion — it's being…
-
New FeatureScript: Cosmetic Knurl
Hello everyone, I released my Cosmetic Knurl FeatureScript: https://cad.onshape.com/documents/0bad5bfa3637bf84138a2a24/w/3daa9f730d6802a81ead8a58/e/af28a7d9efffdd0020743e56 This should help if the 3D modeled knurls are taking to long to regenerate B) You can also type in a custom name and then the name is shown in the…
-
Is there any good way to sync FeatureScripts among several users?
I am part of FRC team 2704, and we are trying to use a few featurescripts from other teams, but getting them onto everybody's account is proving painful. We do have a classroom set up, if that helps or hurts us. The main issue we are coming across with just sharing links to the documents is that some have many…