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.

help to simplify a spring model

Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
I'm working on a configured model for a spring, and i'd love to have a checkbox configuration for a simplified/detailed model. the detailed one is the actual spring model swept on a helix, but for the simple representation, I'd love to just use the helix curve so it doesn't bog down my assemblies or take too long to rebuild. However, I don't think I'm able to add Mate Connectors to the helix, which would quash that idea. I know I could make the simplified version just a cylinder, but i'd really prefer to have something that looks more spring-like. Has anyone done anything similar and have any tips?
Evan Reese / Principal and Industrial Designer with Ovyl
Website: ovyl.io
«1

Comments

  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    edited May 2020
    Configuring the part studio is easy enough. Just suppress/unsuppress the sweep and/or helical curve via a configured checkbox.  However, there's a bigger problem with doing it this way. The curve is considered a separate body in the part studio parts list. I don't believe you can configure whether to use a body vs a separate curve in the assembly. But if you're ok with just inserting the curve and leaving it at that, you can definitely attach mate connectors in the part studio using whatever reference geometry is available. You may not be able to add mate connectors in the assembly, but you can use the pre-made ones just fine.
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    @mahir
    I've got the configurations working great. My issue is in finding a spring simplification I like. My criteria are:
    1. fast rebuild time
    2. fast render time
    3. looks kinda like a spring
    for now I'm just using a cylinder for the simplified representation which tackles the first two items, but number 3 is lacking. I don't think curves are a possible selection as an owner part for a mate connector, so I don't think I can even use the curve as a representation (hopefully someone proves me mistaken); not to mention the trouble it causes trying to swap between a solid body and a curve with different internal IDs

    Maybe I should be looking for a way to add the helix to my cylinder as a split line. That way the internal part ID can be maintained in both configurations. I tried just selecting the helix as the "entities to split with" but it won't even let me pick it. All the ways I've thought of to do this involve nearly the same rebuild time as just sweeping the spring to begin with which defeats the purpose. Any tips there?
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    Three thoughts:

    1) Move forward with the split line technique. But that would require a swept surface to split the cylinder face. A swept surface might be less rebuild intensive than a swept solid, but it’s still not great. 

    2) I haven’t had the opportunity to test this, but you could try using a composite part made up of the cylinder and curve. You might need to make the cylinder smaller so it doesn’t overlap the curve, defeating the aesthetic purpose. 

    3) As I mentioned before, you can just use the helical curve but attach the mate connectors in the part studio ahead of time.

    I think option 3 is the most straightforward. 
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    Thanks, Mahir. 3 doesn't work for what I need because the curve can't own the mate connectors as far as I can see. I'd also like the option to show a detailed model in case we need to for presentations and to be able to swap between them by changing the config of the part from the assembly without breaking mates.1 or 2 could work, and I'll probably end up there. Instead of scaling the cylinder, I'll use a custom feature to set the alpha to zero so I can get it looking like this. 

    I'll probably keep looking for a solution to option 1 with an inexpensive regen time because I'm making this for a team to use as part of a larger hardware library (for things I can't do with standard content), and I don't want this to be the one component that everyone has to remember is a composite part when inserting.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    It’s ugly, but one way to check all your boxes is to export the full spring model and re-import as a dumb solid. It would look good, allow you to attach MCs, and be fast since there isn’t really anything to rebuild. 
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    I appreciate the out-of-the box thinking. That would solve the rebuild issue for a single spring model. I think it would have similar graphical issues to using threaded fasteners straight from McMaster though. In my case the whole point is that it's configured anyway. We're going to keep a few sizes of spring stock on hand, and cut it to length as needed. My config figures out the math, and lets me add the cut length and new spring rate to the part name.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    Oh well. Until OS add support for texture mapping, sounds like you're stuck ¯\_(ツ)_/¯ 
    https://www.youtube.com/watch?v=oqMl5CRoFdk
  • michael_mcclainmichael_mcclain Member Posts: 198 PRO
    edited May 2020
    @Evan_Reese One solution to attach a mate connector to a helix is to use a cylindrical solid or surface and attach the mate connector to that. Set the opacity value (A) to 0 so there is barely a visual part besides the helix. Then create a composite part with both the part and the helix together and insert that into the assembly.

    In this case, you can store metadata in either the curve, the solid/surface, or the composite part; whichever makes the most sense in your case
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    I think mahir is right. I get what I 🎶neeeeed🎶 though 

    @michael_mcclain
    I think that will work. That's what I was trying to describe above with my screen shot. I am going to avoid it a while longer and see how far stubbornness gets me, but I'll probably end up going that route.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • lanalana Onshape Employees Posts: 689
    @Evan_Reese
     You should be able to solve this with  composite part
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    edited May 2020
    I know that composite part could work, but I'm being stubborn about it because I'm also working on other configured components and I want to keep the experience of selecting them the same for my team. I don't want some to be parts, and others to be composites and for people to have to remember which.

    turns out that @mahir was right all along. I ended up sweeping a surface and the rebuild time for that feature is 14ms compared to 563ms 🤯.

    One last issue is left though. For some reason, I'm unable to split the cylinder with that surface. It requires that I also split the surface into multiple surfaces first. In experimenting, I'm also unable to split the cylinder with a single vertical split line. it has to be cut into 2 distinct surfaces. however, if I split the part in half, then split the faces and boolean it back together I'm left with exactly what I want (but it's too expensive in rebuild time). at this point, I could totally settle for leaving the vertical split line, but I'm super curious as to why we can't split it with a single line, when the geometry is obviously possible to produce other ways. A
    nyone care to enlighten me? I'm trying to learn something here so any amount of nitty-gritty pedantry is welcome



    The one on the left has a vertical split line and the one on the right doesn't. I want the low rebuild time of the left solution and the result of the right one.


    Here's a link to a document with two part studios showing each solution. make sure to uncheck the "detailed model" config. https://cad.onshape.com/documents/85cd3b5d9887806828c42c55/w/b250b37b00d0a4565641780a/e/8a9c3aa9ae2bf17c73cb32cb
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    edited May 2020
    @Evan_Reese, looking at your model's regen times, you might be overthinking it. The solid sweep is slower than a surface sweep + split, but just barely. I get 81ms vs 58ms, and that's with leaving the vertical split. You're removing the 37ms sweep, but you've replaced it with 14ms from a bunch of other features, so the improvement is minimal. This seems like a lot of time spent on improving regen by 28% on an already fast part. In my opinion it's not really worth the effort.

    Case in point, I hate threads on screws, but the screw is still easy to work with and aesthetically accurate without the thread. Plus removing the thread makes a much larger relative difference in regen time - more like orders of magnitude vs 28%. For a spring, there's really only one recognizable feature - the helix. And changing how that helix is displayed doesn't seem to make much difference to regen times. But hey, to each their own ¯\_(ツ)_/¯. Maybe you've got a project that uses 1000 springs?




  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    But yeah, I don't get why you can't split a cylinder with a helical swept surface without cutting it in half first. I even tried extending the ends of the sweep so that the surface isn't coincident with the top/bottom edge of the cylinder. Didn't make a difference. Not to mention the Move Boundary feature I used added a lot to regen time.
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    edited May 2020
    @mahir
    Oh I'm totally overthinking it and having a blast doing it. I've passed the "good enough" threshold a while ago. Now I'm just following my curiosity and turning it into a chance to get better at optimizing, which will pay off later when I actually need to be good at it. In the end, the results will be more of a joy to use for me and my team, which is worth something.

    That said, on longer spring configurations the performance difference is meaningful. The simple one is 3.24 times faster at 10in.

    I'm also considering 2 kinds of performance; regen time, and graphics. The simplified model is also targeted toward improved graphical performance in large assemblies. I've run into issues before with needlessly complex hardware. 

    But I'm still overthinking.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • lanalana Onshape Employees Posts: 689
    Not to interfere with your direction, but
    I want to keep the experience of selecting them the same for my team. I don't want some to be parts, and others to be composites and for people to have to remember which.
    if you use closed composite, there'll be no choice of picking a part. https://cad.onshape.com/documents/f2d68d4d13a097b6bd88b8f2/w/63c9075799db48df697b573f/e/8fe024acd08543a225ab4236
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    I understand what you're saying, but here's my issue with that. When anyone from my team goes to insert it, they are faced with this dialog, with composites unchecked by default.

    My project is all about making the hardware we keep on hand as easy as possible to use in our designs so I'm very focused on a uniform user experience across the whole part library. I don't want some items to be Parts and others to be Composite Parts. Our library is pretty limited so I think this is feasible. With bigger libraries of different kinds of parts (like bearings, for example) I'd go ahead with composites. This is one of those projects that, I hope, will be linked to a lot by me and my team, so while the difference seems small, I think over time, with lots of use, it adds up to something meaningful.

    Or maybe I just want what I want 😄
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • lanalana Onshape Employees Posts: 689
    I see. That behavior actually seems wrong to me. Thank you fo helping me to understand that 
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    lana said:
    I see. That behavior actually seems wrong to me. Thank you fo helping me to understand that 
    Thank you for pushing on it more. It definitely provoked more consideration on my end, and would still be a totally fine option if I hadn't already figured out an ok way without it.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 398 PRO
    edited June 2020
    @Evan_Reese
    You can't cut the cylinder with only one helix surface, because after the cut you still have only one single surface. And I think Onshape doesn't allow this. The solution is to duplicate the cylinder and rotate it. Then you can use the split command with both helix surfaces.



    I made a copy of your document and added the changes:
    https://cad.onshape.com/documents/708d82476ac554e773d489e8/w/75d228f49a516c47d9c359ac/e/f4d333162fad3aedcf6874d3
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    @Evan_Reese
    You can't cut the cylinder with only one helix surface, because after the cut you still have only one single surface. And I think Onshape doesn't allow this. The solution is to duplicate the cylinder and rotate it. Then you can use the split command with both helix surfaces.



    I made a copy of your document and added the changes:
    https://cad.onshape.com/documents/708d82476ac554e773d489e8/w/75d228f49a516c47d9c359ac/e/f4d333162fad3aedcf6874d3
    makes sense. it's like how if you try to split a sketch circle it makes you pick two points to split. I like your solution, it's clever. Since I'm representing a spring with a wire diameter, I can even do some math to make sure the space between the helixes represents the wire dia. I'll give it a shot.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    The result is basically just a vertical line swept along the helix. Maybe it would be quicker to do this directly? You wouldn't need to copy/rotate the helical cutting surface or split a face. You'd also end up with just one body, a swept spring surface that looks a lot like a spring to me.
  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    mahir said:
    The result is basically just a vertical line swept along the helix. Maybe it would be quicker to do this directly? You wouldn't need to copy/rotate the helical cutting surface or split a face. You'd also end up with just one body, a swept spring surface that looks a lot like a spring to me.
    I see your point. This could be a good solution too.
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • romeograhamromeograham Member Posts: 656 PRO
    ...and if the small vertical line (per @mahir ) is "normal" to the helix, you don't need any math: the length of the line = wire diameter. Define a sketch plane normal to the start of the helix. Should be close enough, no?
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    The extra plane isn't even necessary. Unless you choose a different starting angle, the helix endpoint will already be coincident with one of the default planes. And this is definitely faster. 38ms BOOM!


  • Evan_ReeseEvan_Reese Member Posts: 2,060 PRO
    Can't argue with 38ms! is there a good way to switch between this surface and the full-detail solid model in an assembly since they have different internal IDs? that's one reason I was going for the splitting option. That way I can make sure they are the same "part" with just different configurations instead of creating 2 different bodies. 
    Evan Reese / Principal and Industrial Designer with Ovyl
    Website: ovyl.io
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    edited June 2020
    Hmm, what if you then create the solid spring by thickening the surface inward and applying 4 fillets with radius equal to wire dia / 2? Will that give you a consistent ID? And if the lightweight model looks so much like a spring, would you even need the full solid model?
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    Got it to kind of work. Horrible regen time.

  • sebastian_glanznersebastian_glanzner Member, Developers Posts: 398 PRO
    How is the regen time when you add a four chamfers instead of fillets?

    You should get a 8-sided wire, which looks kinda round :smile:
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    edited June 2020
    How is the regen time when you add a four chamfers instead of fillets?

    You should get a 8-sided wire, which looks kinda round :smile:
    I doubt Evan would want a chamfer, but I tried it out of curiousity. It's about 1.5s faster, but 400ms is still pretty slow compared to a solid sweep.
Sign In or Register to comment.