Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
New Feature: Tween Curve (WIP)
Derek_Van_Allen_BD
Member Posts: 471 PRO
This is a bit of work in progress at the moment but it's semi functional and I need to work on other tools that this tool is the backbone of. Posting now for public comment. Introducing Tween Curve
Simply select input curve A and input curve B and input a tween value between 0 and 1 and this tool outputs an approximate medial curve AB that is that percentage morphed between the two inputs.
Currently it's limited to single edges for each of the inputs because I'm still working out how to make piecewise segments work for continuous path geometry. This tool by itself is already useful for some workflows but the larger goal is to use this feature as a starting point for other features I've got planned like a frame unrolling script that can unfold frame geometry with a k factor specified by the tween, or other shape deformation scripts that I've got in the works.


Comments
Let's goooo!
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
Noice! This is going to be sweet.
I need a web extension to auto post on anything @EvanReese does. That way I won't need to log on =P. I never seem to beat you to it.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Be warned: it's a little buggy. I'm currently reworking the orientation checks between input curves to handle orientation flipping between paths. Sometimes I'll still come across a zero-crossing case with one curve to another and haven't found a universally robust way to find path direction.
Derek Van Allen | Engineering Consultant | MeddlerSee I feel like you're always the fastest gun in the west 🤠🌵
@Derek_Van_Allen_BD Can you just do your best and add a flip button for those cases? You may not really be able to cover them all. Maybe not though since you're using these functions as a backbone of other features.
As an aside, I could imagine cases for another mode to create a certain number of tween curves. Instead of a "tween fraction" the input is "steps".
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
I did have the flip button implemented at one point in time but as you say this is intended to be the framework for much more advanced features. If I don't have a robust method of alignment checking worked into the base level function I'm just going to be needing to tackle that same problem later at higher levels of abstraction, and in more places at once. If you dig back into the history of the 3d arc utilities functions underneath this I dealt with a similar problem with making tangent 3d circular arcs. There are 2 ways to solve for a tangent circular arc and I had a hard time guaranteeing that the one chosen would be the correct one for a given application for a minute there, so I was just drawing both and keeping the less nonsensical one. I later found a better way to guarantee that things draw correctly but I don't think that same end evaluation technique works in this case, though I admit I haven't tried it yet.
Derek Van Allen | Engineering Consultant | MeddlerMight it work to use evDistance() on the end points and choosing the one that minimizes the total distance? I'm sure you could find exceptions.
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
That… is much more intelligent than what I've tried so far. I started with the current implementation attempting to find tangent vectors because that's how the arc utilities had to function (and also is how frames function) but there are extra factors at play in both of those implementations that don't necessarily apply here. Won't cover the periodic curve cases, but there's already a whole subroutine there for those.
Derek Van Allen | Engineering Consultant | Meddlernice! you may already be measuring the distance between all verts on both curves anyway, in which case there's no need to limit it to the endpoints. You could use 'em all.
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
Thanks for putting this out there @Derek_Van_Allen_BD . I'll give it a try too and give feedback.
I don't want to get anyone too excited yet but…
Derek Van Allen | Engineering Consultant | MeddlerI'm not excited. YOU'RE EXCITED.
Ramon Yip | glassboard.com
Still a lot of complexity to resolve but let me tell you this one's gonna be good when I'm done. This ain't your garden variety subsampling surfacing operation, I'm pickin up what de Boor is putting down.
Derek Van Allen | Engineering Consultant | MeddlerOo that's cool.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Here's some early access to the Twurface sandbox.
(I probably will not call it that)Lots of demo cases that don't work at the moment because B spline surfaces are a beast of calculus and I'm a college dropout who failed math 3 times, but also lots of demo cases that DO work and that's promising.Derek Van Allen | Engineering Consultant | MeddlerExciting. It would be nice if there was an option for a bunch of surfaces, the way @EvanReese FaceCurves does for isoparameters.
Simon Gatrall | Product Development Specialist | Open For Work
@S1mon 100% will get there some day. The domain matching solutions being used in @ry_gb's Loft Fillet and my Tweep features are the gateway to that functionality to be able to handle mismatches in input but finding domain matches in 2d or 3d is gonna be a bigger challenge than the effective 1d that those scripts can get away with. Hopefully it's not one of those mathematically indeterminate things with infinite solutions.
Derek Van Allen | Engineering Consultant | MeddlerThere was a similar request for multiple tween curves, which ended up being a really simple implementation since Derek did all the hard work: Multi-Tween. On the other hand, peaking under the hood of this🤯, I'm not touching any of that.
Ramon Yip | glassboard.com
OH y'all just want equispaced patterns of the single surface to surface case. Yeah that's not a hard implementation. Same approach @ry_gb used is applicable. Run the feature in a loop at all the divisions for your number of desired surfaces.
Shoutout @EvanReese for showing off this little non-featurescript based trick. This could be baked into a feature for sure but I'm focused on the utility level at the moment.
For a second I thought we were talking about tweening surfaces where you want different numbers of inputs on either side and I was like damn tough crowd, alright. Guess we gotta solve the multi-domain problem in 3 space.
Derek Van Allen | Engineering Consultant | MeddlerI mean, well now that you spoke it into existence… ¯\_(ツ)_/¯
Ramon Yip | glassboard.com