-
Custom Feature: Design Intent
Link to Design Intent During design reviews I am often asking or being questioned as to why a model was formed the way it was. Usually the answer is in someone's head or personal notes and lacking from any formal documentation. If it is in documentation, then it is likely far from the CAD (unless you keep that in Onshape…
-
Temporary Items During Edit?
How do first party features do things like "Show isocurves"? Is there a standard way to draw stuff without debug() or manipulators that disappears when not editing?
-
Applying bend reliefs to vertexes between rips and bends?
Working on yet another sheet metal script and I'm really close to completion on a build that's ready for deployment but I'm having issues getting bend relief geometry to generate on the ends of my bend segments of sheet metal parts. I suspect my issue is that I was trying to apply bend relief attributes to corners that are…
-
Extrude up to body, up to face, booleans, performance
With Parasolid and FeatureScript performance in mind, I'm trying to figure out the best approach to creating a lot of features which a normal user would use "up to next"/add. As a regular CAD user, with things like bosses and ribs on injection molded parts, whenever I've been working complex models for a while, each…
-
ChatGPT Atlas for FeatureScript vibe coding
OpenAI has introduced ChatGPT Atlas, which is their own web browser with built in ChatGPT agent functionality. So far this is MacOS only, but Windows is in development. https://openai.com/index/introducing-chatgpt-atlas/ What this means potentially is that you can use ChatGPT to vibe code FeatureScript. So far I'm not…
-
Toggling Modes Updating Stored Values?
I'm reworking the standard Trim curve feature. One trick I'm trying to make work is to allow the user to trim/extend "up to entity" and then switch to "blind/distance" mode where the value of that blind distance comes from the up to entity, but now it's draggable/editable. As an example, let's say I've blind/extended a…
-
Use Report, viz(), and dbg() for conditional println and debug visualizations
Earlier this year I wrote a utility called "Report". The one-sentence description is "Conditional debug visualization and println controlled by feature and not by code". Here's an intro video: https://www.youtube.com/watch?v=Eu7puEa8Oak You can find the feature and functions here:…
-
Tapered Recess Creation?
I've been struggling with one aspect of a molded boss feature I'm developing. I've tried a lot of different ways to solve this but getting a general case method that is robust is surprisingly challenging. I'm working on a molded boss feature to rival hole.fs in complexity which takes basic choices for screw type/size and…
-
Auto part marking scripts?
A common request from my team is the want for a script that automatically generates part names or numbers and etches / engraves the text into the surface of the part somewhere so that our fabrication team gets easier puzzles to put together and the drafting team gets to spend less time writing puzzle solving instructions.…
-
Does anyone have any good examples of how to use startTracking?
I've read a few posts on the forums, but would like to see some examples on how to use it. My dumb brain is failing to understand how to implement it in practice.
-
OpLoft Fails
Hello, I am trying to do an opLoft, and it fails, giving me the following error: @opLoft : LOFT_SELECT_GUIDES I am initializing the loft in the following way: opFitSpline(context, id + ("outSpline" ~ edgeId ~ "Face" ~ faceId), { "points" : outPts }); opFitSpline(context, id + ("inSpline" ~ edgeId ~ "Face" ~ faceId), {…
-
Extrude BoundingType Problems
I'm working on an injection molded boss custom feature. I'm trying to get the bosses to extrude to the part with or without draft reliably. In doing so, I'm discovering weird things about UP_TO_NEXT or UP_TO_PART which are causing issues. Here's a manual feature based version of this issue - if I use up to next or up to…
-
Is Dynamic Text Possible in a Collapsed Group Header?
Title pretty much says it all. I want non-editable text that can be updated in a group header that can be collapsed. For example: ⌄ Boss OD 2.0 x d = 5.0mm Ratio 2.0 Diameter 5.0 mm > Boss ID 0.8 x d = 2.0mm > Pilot ID 1.0 x d = 2.5mm
-
isDragging()? Manipulators?
Is there a way to know when a user has let up on the mouse and is done dragging a manipulator? I thought I was making good progress using ChatGPT, but today we're been going in circles trying to resolve this. The bigger issue is that I'm trying to implement NUV motion for splines. I had a pretty good version working, but…
-
New Feature: Edit Curve Plus - BETA
https://cad.onshape.com/documents/cbd5b34feb4bb0575a2bb2b4/w/37bf21e38c9e1ebe1fdbda21/e/113fec25a8e729bfba1786e4 So this is even more experimental than Bridging Curve Plus, but it seems to do some things that I've wanted for a while. Onshape doesn't have great ways to manipulate multiple points in a feature at once, and…
-
A few more undocumented FeatureScript functions
Over on the SmartBench blog I've written another article discussing a few undocumented FeatureScript functions that I find useful. Read the blog article here While there are some hidden gems in the std code, just keep in mind that undocumented functions could produce unexpected results, or change without warning. Something…
-
Do you need a "Transform sketch" feature? Request for feedback.
Hey everyone, I'm working on a new custom feature called "Transform sketch". This isn't an activity I frequently need in my own modeling so I wanted to ask for some suggestions before writing much more code. IF this is something you need, please let me know when you would use it, what you use it for, and what controls you…
-
New Feature: Bridging Curve Plus
I don't have an icon or an explainer page yet, but I wanted people to bang on this and tell me if there are any obvious issues. So things might change, but I hope this is a reasonable approach. For a long time I've wanted to have a way to optionally make both sides of a Bridging curve work the same. I actually did 98% of…
-
Multiple Intersections with evDistance or ???
I'm trying to find all the potential intersections between two arbitrary 3D curves (edges). I've been playing with evDistance and discovering that it always comes up with a single result. There are some old threads and ideas around splitting or sampling curves to get more complete results. What is the current…
-
FeatureScript writers: Stop using println! And start using Report (New FeatureScript announcement)
Actually, It's totally ok to continue using println! But I wanted to introduce a new FeatureScript called Report that will help you control your featurescript notice area output. It's a bit hard to describe, so take a look at the HOWTO video below:…
-
Configurations API endpoint
Hi All, I have a Partstudio that has several configurations (A, B, C, D, etc…). When I use the below endpoint. https://cad.onshape.com/api/v13/elements/d/{did}/w/{wid}/e/{eid}/configuration It gives me all the available configurations which I can use to construct my next API calls, however, it always defaults to…
-
Free Form Deform Sandbox
Lazy post this time because this is not really a feature. More like the concept of a feature. The people yearn for generalized object deformation in Onshape and I recently vibe coded up some core utilities that can offer a solution in that space but it's real rough stuff at the moment and y'all are gonna be waiting some…
-
I want to learn about NURBS mathematics to better use Feature script. Where do I start?
NURBS (Non-uniform rational B-spline) is the square patch surface definition logic that the onshape modelling environment is based on. I want to be able to tap into that power with featurescript so that I'm not creating, analysing and deleting topology just to get some information. For example I would like to be able to…
-
Extrude along a line featureScript
I'm trying to create a feature that allows me to easily create print-in-place hinges for a personal project. One of the features is that I can define the angle the hinge is created at. how can I edit my script to make the extrudes occur along the same path as the line given? Here is the document:…