Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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: Miter Warlock

Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 218 PRO
edited June 9 in General

Recently we had a client commission a project from our company that was to be manufactured out of Corian countertop sheet goods and they wanted perfectly mitered corners on all of the parts with no visible seams. Oh and they sent a concept model that had exactly zero right angles between faces. As I sit there mentally tallying all of the potential hours spent manually placing splitting planes or attempting to draw extrusions edge on I gave the sales team my overestimate for a go-away price to avoid the headache. Then the client paid it. So suddenly I was motivated to develop an alternative tool to avoid ever having to sketch a mitered joint ever again. Introducing Miter Warlock.

So imagine you were handed an object like this from a design team and asked to make it out of sheet goods. How would you panelize it? Does your approach scale to an object with hundreds of unique N-gon panels with random angles between every adjacent face?

image.png

Well if it does you should probably have told me about it before I wrote this script.

image.png

Miter Warlock takes a face or faces as a user input, finds the closest parallel(ish) face on the same part that lies behind that face, and draws a loft between the face pairs to split the parts into perfectly mitered panels. The input geometry can be drafted using whatever tools you desire, the only requirement is that you have some kind of shell-like geometry as a starting point whether that was made using shell, sweeps, 3 extrudes in a trench coat, whatever. There isn't even a requirement that each face in the part be a consistent thickness with the others on the same part. You just can't use b-spline faces for reasons I'll explain in a moment.

image.png



Since the resultant bodies are split, Ids are preserved for downstream operations. Don't put hole features in before this tool gets used though, I'm not checking for internal loops yet. Probably the highlight of the tool though is how it handles corner cases. Literal ones. This topological nightmare.

image.png

This is where the tool gets its name: loft features in onshape cannot cleanly resolve cases where the number of edges mismatch between loft profiles, and will draw spline faces in places where I need nice clean planar miters. Instead of studying how this problem ought to be solved methodically like a good wizard I started borrowing any available public features that do faceting things to facet my errant spline faces. I settled on Konstantin's Convex Polyhedron script as a faceting function for my script. I think that makes him my patron and my publishing this means I'm contractually bound to owe him a favor. At least I never need to draw a sketch for a miter again.

Comments

  • MDesignMDesign Member Posts: 1,088 ✭✭✭✭

    go away price…LOL. Love these projects. You get to expand your skills and get paid for it.

  • This content has been removed.
  • jonaskuehlingjonaskuehling OS Professional, csevp Posts: 17 PRO

    Derek, thank you very very much for sharing your script here - that is AWESOME. I found it just seconds before attempting to cook up something similar by myself, searching for useful snippets and inspiration for this kind of problem. This already does everything I would have wished for.

    Again, thanks a ton for sharing! 🙏

    Onshape and Feature Script, I love it 😍

    Jonas

  • martin_kopplowmartin_kopplow Member Posts: 948 PRO

    Hi @Derek_Van_Allen_BD , in this case, I don't have to use my imagination, for I have done such things in the past. Clients from the trade fair / exhibition business just loooove this kind of shape and they also love Corian, of course. I also went with the shell aproach, to start with. Then separated all faces and did the lofts. For depth select was a function on the mouse wheel back then, It was rather quick (for manual work): Hover over a face, click, turn mouse wheel one click and click again to select back face, hit the program's equivalent of loft, go to next facet.

    Besides the fact that the designer who sent this shape used Rhino, which usually produces unusable geometry with no face being planar, it went well. It was more or less the carpenter shop who grew grey hair over cutting these things …. ;0)

    Anyway, your script is so much more elegant. Thank you very much for sharing!

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 218 PRO

    My only regret is not owning the 5 axis mill that makes these panels a cakewalk to cut arbitrary angles. There's a lot of ball nose action in our CNC department's future.

Sign In or Register to comment.