-
Custom Feature: Tangent Fill
FeatureScript link I've been using SolidWorks a lot lately (not by choice) and one of the features I found that is nice is the Tangent option in the Filled Surface feature for when you're filling in patches in places where fillets leave sharp pinch points. Now, while the native Onshape Fill already does this, it's a PITA…
-
Help with featurescript subtraction
link: https://cad.onshape.com/documents/a8c134757a29b9f4453f6e31/w/6b12b36328a688485352be68/e/984235c5f06469cc73216905 I think my code's probably super messy, so sorry. So, I'm trying to make a featurescript that will make holes in the end of square tubes. I got it to make a sketch with a circle, and Extrude it through…
-
New FeatureScript: Engineering Grid
Hi everyone, So I made my own ISO grid featurescript. I tried out the other two feature scripts that can create isogrid patterns, and I found that Julia's is fast but rudimentary, and Evan Reese's is immensely powerful but slightly slower than I would like, and is missing a couple of features I wanted. Of course, the next…
-
Reference Guide or Documentation for FeatureScript Docs Comments?
Does official documentation exist for the docs comment syntax in FeatureScript? These are the comments that start with "/**" and generate the popups that appear when hovering over a function or type. I have been able to figure out a few things from the std source as well as trial and error but searching for real…
-
Custom Feature: Bip Joints - A Hand Bendable Sheet Metal Joint Feature
-Link to feature up front- If you're a producer of sheet metal parts, or design your parts for sheet metal production, there's a strong possibility that your manufacturing pipeline is catered towards hard flat flanges with edges parallel to the bends because that's what the manufacturing process favors. This manufacturing…
-
Printable Counterbore FeatureScript
This is my first time trying out creating a FeatureScript. It's all vibe-coded but works pretty well after some tweaks. It takes ideas from https://www.baysingersadditivemanufacturing.com/design-floating-holes/ and https://blog.rahix.de/design-for-3d-printing/ for how to modify counterbore holes to better handle floating…
-
Is there a Featurescript for finding and replacing certain dimensions.
I have sketched several dozen and I need to do it without going through all individually. I thought I saw a video for onshape that used this 'script.
-
User Interface Guidelines?
It would be great if Onshape would publish a set of User Interface Guidelines like other mature platforms. I find myself often thinking I should try to emulate first party features with things that I'm developing, but then I wonder how much of some of them are legacy results of adding functionality and not wanting to break…
-
LLM powered Autocomplete
https://www.linkedin.com/posts/onshape_ai-in-cad-doesnt-need-hype-it-needs-data-activity-7442589890086690817-lwqe As I commented on LinkedIn, "I'm excited to see this step, but isn't this where Copilot was 4 years ago? I'm writing whole features using Codex/ChatGPT with local clones of the standard library and…
-
Custom Feature: Gear Rack
Realized I needed to design two gear racks for a robotics project, and rather than spend 20 minutes doing it manually, I wrote up a custom feature to automate it with some quality of life features (helical/herringbone teeth, fast regeneration, alignment stuff, blah blah blah) Snag it here if you'd like! 100 tooth regen…
-
skArc/Constraint syntax and radius calculation error
Hi! So I'm trying to create a custom feature and i've found a problem where i try to create an arc using 'skArc' and later define it using 'skConstraint' with '"constraintType" : ConstraintType.RADIUS' but while the original points defined in "start" and "end" are correct in the part studio the "mid" point and therefore…
-
toString in Description?
I'm trying to give a tooltip for a UI parameter using the description and I'd like it to show the range. I know if I enter a value outside of the boundsRange it will show the range automatically, but it would be nice to have some hint of what that range is without guessing. It seems like creating a const or inlining the…
-
Can't figure out CANNOT_RESOLVE_ENTITIES from opBoolean
I've been going through the FeatureScript Fundamentals course in the learning system, and I'm on the final exercise. I'm getting a CANNOT_RESOLVE_ENTITIES from a opBoolean call, and I can't figure out what going wrong. I've more than triple checked my code against what's provided in the instructions, and I've added debug…
-
SET COLOUR, MASS, AND CUSTOM PROPERTY OF GEOMETRY CREATED BY FEATURE IN ONE GO
I have modified the standard sheet metal model feature to be more straight forward for me. If I select a particular material in my custom sheet metal feature, at the moment it sets the thickness, inner rad and kfactor to the appropriate values. Would be create if it also could set the colour, mass and assign a string to a…
-
Split Part using Ruled Surface?
I've been working with some laser cut tubing recently, and have had to go back and forth with suppliers about normal-to-surface tube cutting that doesn't exactly match our model. I've found guides for normalizing coped and mitered cuts on round tube, and used them to come up with a process for transforming a tube modeled…
-
New Custom Feature: Standard Bearing
I needed to chuck an MR63 bearing into a project I was working on, and got a little sidetracked. Built a custom feature to generate deep groove bearings for basically all ISO standard sizes. Includes the following bearing families: 6000 series 160 series MR series MF series 600 series F600 series R series FR series in…
-
Custom Feature: Dovetail Joint
I've developped a complete custom feature to help 3D printing assembly design. Dovetail Joint Created By: Nicolas Barret Link: OnShape document link A custom FeatureScript that generates male and female dovetail joints between touching solid bodies. Tailored for 3D printing assemblies, it automates the boolean cuts and…
-
Custom Feature: Triad Transform
-Link to feature up front- Onshape's vanilla transform feature doesn't give you those nice buttery smooth rotation handles to play with like the assembly tabs do, which is a shame because some of the most aesthetically pleasing structures aren't confined to the bounds of XYZ coordinates. I mean look at these crystal…
-
[Chatbot Copilot] - We Built a FeatureScript AI Assistant That Outperforms ChatGPT
Hey everyone, I’m a mechanical engineer, and I’ve been working with FeatureScript at my company for about a year now. Honestly, it’s been tough. Tools like ChatGPT suck at FeatureScript, which is frustrating when you know how useful they are for more familiar languages like JavaScript or Python. Unless you're a…
-
Classify Onshape Standard Content in FS?
Hi everyone, is there a way of creating a query to determine if a part is Onshape standard content in FS? I think there must be some kind of undocumented, internal "standardContentId" or something like qGeneratedByStandard because somehow the standard icon in the feature tree has to be added to these certain parts in the…
-
Given a mate connector how do you find the owner body for it?
How do you go from a mate connector to the owner part? I tried qOwnerBody(mc) but that seems to return the MC itself since MC's are bodies in their own right. annotation { "Feature Type Name" : "OwnerOfMC" }
export const myFeature = defineFeature(function(context is Context, id is Id, definition is map) precondition {…
-
Is it possible to use feature script to quickly export mass property values for assemblies?
Hi all, Still learning about feature script but I wanted to know if anyone has had any experience using Feature Script to export/output data (specifically mass property values like mass, center of mass, and moment of inertias) into either the command line or ideally into a txt file for an entire assembly. This action would…