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.
Custom Feature: Loft Fillet
ry_gb
Member, csevp, pcbaevp Posts: 69 PRO
Because of @EvanReese's series on equations, variables, etc. in Onshape, I ended up getting sucked into the FeatureScript rabbit hole. Needless to say, I'm hooked. I'm not a real programmer, but I'm still pretty happy with coming up with something that'll automate a pain point in my CAD workflows. Plus, then I get to share this with the rest of my team.
Link to FeatureScript: Loft Fillet
I created a feature to help avoid the very common (but also very niche) occurrence when that arise from creating edges that terminate on smooth edges, tangent faces, you name it. They generally result in fillets that taper to a point or else just failing altogether. Usually, the workflow to get around this is to:
1. Sweep a circle
2. Extend sweep faces
3. Trim away main body faces
4. Create bridging curves
5. Loft between the open edges
6. Remaining cleanup with booleans, fills, and additional splits
Needless to say, it's a very involved process that requires a few steps and a ton of clicking. Loft Fillet does all of that in one feature. This feature was inspired by @MichaelPascoe's Analyze Fillet. I saw he had a Split Sweep feature, but I couldn't quite get it to work as I intended. I tried to handle as many use cases as I could think of, but obviously, I can't think of everything. Appreciate any feedback that you guys might have. If anything, feel free to peak under the hood to see if there are any optimizations I could implement.
Ramon Yip | glassboard.com


Comments
Amazing. I've had thoughts of such a feature many a time, but never even gotten started.
In theory a Face Blend with width control should make this feature unnecessary, but it seems to fail if the dihedral goes to zero. In your test cases, Face blend could only handle test case 4, everything else would take multiple extra features.
Any chance that you can/will make the bridging curves G2 or G3?
Simon Gatrall | Product Development Specialist | Open For Work
Thanks for checking it out!
I figured this feature is a pretty niche, but I find myself going through the workflow way too often. Some of the test cases are covered by the vanilla Fillet, but I needed some quick geometry to test trimming away end caps and filling gaps.
I can add implementation for G2/G3. It's a pretty simple change in the code. I wanted the feature to be up and running before introducing more complexity to it as I'm still really new to FeatureScript and haven't dealt too deep into programming, really.
Ramon Yip | glassboard.com
@ry_gb :
Awesome feature! I can see myself using this one a lot in surfacing work. I can already think of a model that I could have simplified or improved with this feature.
I second S1mons improvement request for g2 loft constraints and perhaps even g3 bridges.
As a token of my appreciation, please find a Loft-fillet icon you can add to this featurescript to have it stand out!
That is a very useful one for those who do surface stuff. Thanks a lot.
Wow this is really cool, Ramon! It will definitely come in handy. I love that I've been able to be at least part of the inspo here.
Here's what comes to mind for improvement ideas. It's already a very useful feature as-is and this is all just my opinion, so do whatever feels right to you and what you have the time and will for:
"Default" : trueand if you think some users might not like that you could also add"UIHint" : UIHint.REMEMBER_PREVIOUS_VALUEto keep them set to whatever that user used last.The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
Nicely done! This is impressive work. 😎👍
It seems to handle most cases better that the Sweep blend. Adding this to my toolbar for sure.
Doesn't look like you need it, but just in case, here are the two best places to learn FS:
FeatureScript Fundamentals by Onshape
FeatureScript Video Tutorials by CADSharp
With @EvanReese's tutorial spree, I wouldn't be surprised if he has a FeatureScript series cooking somewhere on the back burner? 😃
.
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Another thing I forgot to mention earlier, using the radius of the sweep is a little out of line with the width control in other tools. Technically, width and diameter are different, but I would be tempted to switch the parameter to the diameter instead of radius in order to get more similar results with the same number to the width control in the fillet and face blend features.
Simon Gatrall | Product Development Specialist | Open For Work
You're right sweeping a circle is a bit different than a true chord width fillet, but I'm actually unsure how I'd even do that manually on an edge with varied dihedral angle. Any ideas? This feature definitely automates something I've done manually many times though. I like the idea of changing it to "Diameter". Fillet radius is a bit deceiving, as most people will rightly expect it to produce a blend with that radius of curvature, which it doesn't. I feel like there may be an even clearer wording, but I'm drawing a blank.
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
Serendipitous timing putting this feature out there around the same time that those bike guys were on the forums asking for more surfacy fillets for their omega bike studios. Seems like a great tool for product design.
Derek Van Allen | Engineering Consultant | MeddlerOne bug/feature request: right now this feature will switch a solid part to a surface, even if it's fully enclosed. I haven't done enough testing to see if this is universal, but I see that it happened in most of the test cases in the sample part studio, and in my own tests. It would be much better if solid parts stayed that way and kept the same name/internal ID.
Simon Gatrall | Product Development Specialist | Open For Work
That's super odd, because in previous versions, it definitely was NOT doing that. I have "makeSolid" set to true in both opBooleans. I'll take a look when I have the time. (Edit: looks like one of those was set to "false", which was the culprit!)
Thanks everyone for the feedback. I'll make sure to implement of bunch of your suggestions. I agree with the point about fillet radius vs diameter. I think I'll just change it to "Blend Width" for now.
Ramon Yip | glassboard.com
Special shoutout to @jelte_steur_info I was struggling to come up with an icon. What you sent over is perfect!
Ramon Yip | glassboard.com
I have an update. Here's the list of changes:
I'm sure some other stuff I did escapes me, but these are the major changes. I encountered a few bugs that I'm unsure how to fix yet.
Known bugs for now:
doesn't work for edges arranged in a u patternbridging curves fail if one of the edges is common between both sets I think it's fixed now.Looks like these were both caused by the same issue.Ramon Yip | glassboard.com
I've looked at the one's from Onshape, but not the stuff from CADSharp yet! I'll definitely take a look. Still learning a lot as I go.
Ramon Yip | glassboard.com
I'm really excited to see the progress on this feature. Thanks.
Some observations:
Simon Gatrall | Product Development Specialist | Open For Work
Edit: I just re-read your third point. And I can definitely add the influence back in if it's just on the first point. I just didn't want to do it for all three, because of the havoc that would cause.
Ramon Yip | glassboard.com
I wouldn't include all the Bridging curve parameters, but I would include the Start and End magnitudes, with edit control points on. Here for example, I would like to see 0.6 as the magnitude that is exposed to the user in your feature, but under the hood these would be the settings:
Simon Gatrall | Product Development Specialist | Open For Work
Pushing another update. I took your suggestion and implemented the change where Magnitude control the start magnitude of each Bridging curve side. That took like 10 minutes to do.
And THEN, I found another bug related when there's only 1 guide curve available and turn on Make Bridging Curve 1, which took the the better part of an hour to figure out. The joys of programming… This reminds me why I'm not a real developer.
Anyway, thanks for all the feedback and really diving in deep! I figured it won't be many of us that use this feature, but the ones who do will get a lot of use out of us (provided it works properly).
Edit1: Grrr… Technical difficulties. Now it's borked for something else. Please hold…
Edit2: I fixed the bug. We're back up and running now.
Ramon Yip | glassboard.com
This the realest thing I've read in a while haha
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com
This feature makes me so happy. Being able to dial in things like this within a single feature is amazing. Looking forward to a boundary surface option, but otherwise this is incredibly useful.
Simon Gatrall | Product Development Specialist | Open For Work
That's great to hear! I figured that not many of us need this feature, but those of us that do would use it quite a bit. Let me know if you have more feedback! I'm sure there's a edge case or two not quite covered yet.
(Although I do think for that specific use-case using the Width option inside of the Fillet tool gives more consistent-width results.)
Ramon Yip | glassboard.com
I spent some more time directly comparing the results of the built in fillet tool and the loft fillet in this case (loft fillet is on the left, regular fillet on the right).
You're right that a curvature fillet with width control is pretty good. Some of the trim is a little weird, but overall it works well. In this case, if I was really trying to dial this in, I'd end up building this transition by hand so that I could simplify the trims as much as possible to keep the complexity of the transition surface as low as possible.
One thing I see people doing with Plasticity, Alias, Rhino etc, is taking the original edge and rebuilding (approximating) that curve to be as simple as possible first, and then sweeping the circle along that to get the trims.
Here's a version where I hand built the trim curves and added a bridging curve in the middle and then built the transition surface with two boundary surfaces. (left is hand built, right is stock curvature fillet with width control.) This makes the highlights at the apex of the transition behave better and keeps it from wobbling so much.
One could noodle this a lot more.
Simon Gatrall | Product Development Specialist | Open For Work
I saw in Michael Pascoe's Split Sweep feature that there was an Approximate Curve option. I did add that at some point, but the connection points got all messed up from the resulting edges of the adjacent surfaces (say, if side 1 has three faces vs side 2 having one). The edges would probably need to be split evenly to make for good geometry. Do you have any examples or videos you could share where someone approximates the curve? I've been watching some Plasticity videos and have been curious about how close we can get to its results with Onshape (sans xNURBS).
The whole goal of the script was to reduce the amount of steps I need to take when Filleting produces unde (i.e. when it tapers to a singularity point), particularly because the whole Sweep→Split→Trim→Bridging Curve →Loft workflow is pretty time-consuming. However, I'll say that if I wanted even more control, I'd be in your camp and build the surfaces manually.
Ramon Yip | glassboard.com