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.

Custom Feature: Loft Fillet

2»

Comments

  • RamonYipRamonYip Member, csevp, pcbaevp Posts: 139 PRO

    In my other thread asking for some additional feedback, @Konst_Shsuggested using paths for parametrization and extracting an array of parameters for each curve. That might get more accurate results, if you wanted to try that as well. Although I do think you were going to go that direction already.

    Link the thread for the actual explanation.

    https://forum.onshape.com/discussion/29561/can-anyone-show-me-how-to-properly-use-oploft-connections

    Ramon Yip | glassboard.com

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 481 PRO

    I basically just run the version you had working twice. A to B, then B to A. Maybe there's some worth in adding in some tolerance snapping to the connections by distance but I think that would result in worse surface quality even if it does result in fewer surfaces.

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 481 PRO

    Number 1? Or number 2? Number 1? Or number 2?

    LoftConnectionsDemo.gif

    I'm sure there are cases where you'd want one over the other for either of these modes. I'd take a harder stance myself but I don't speak zebra that often and I'm a little rusty.

  • S1monS1mon Member Posts: 3,790 PRO
    edited December 14

    It's hard to tell. I would want to see this with high quality turned on. The zig-zags in the zebras seem to be artifacts of the tessellation, not necessarily true results. I'd also want to look at the curvature color maps, and curvature analysis - combs, CVs, and knots.

    Just looking at the connection curves, I would pick EV distance - they seem more normal to the flow and with less wiggle.

    Simon Gatrall | Product Development Specialist | Open For Work

  • RamonYipRamonYip Member, csevp, pcbaevp Posts: 139 PRO
    edited December 14

    I'm really curious to look at how the code has evolved.

    On mobile, so I can't test it out myself, but I think path length parametrization produces better results.

    Speaking of zebras, I would turn on curvature continuity on the loft end conditions and bridging curves to check more closely. But overall, they look pretty good. I would turn on High Quality to check for sure.

    This area in particularly looks wonky for evdistance compared to parametrization. Are there any performance benefits to picking one vs the other?

    1000046367.png

    Ramon Yip | glassboard.com

  • RamonYipRamonYip Member, csevp, pcbaevp Posts: 139 PRO

    I see what you're saying. Looking at the actual model, the connection curves are wavy with parametrization, which isn't ideal either.

    Ramon Yip | glassboard.com

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 481 PRO

    Here's a demo that turns all the options into configuration variables to play around with. It looks like path parameterized gives slightly better curvature continuity but with a lower performance. I'd also expect that it would handle corners worse than the evDistance method but that's largely a guess. I made it an option to turn on or off curvature matching at each edge and it looks like it's smoother with it on.

  • S1monS1mon Member Posts: 3,790 PRO

    With this particular set of inputs, I find that evDistance, Match curvature: off, curvature: 2, and guide curves: off produces the cleanest results. In theory, turning match curvature on would be a good thing, but Loft just adds a lot of extra CVs/knots to the edges and makes things more wobbly than necessary.

    image.png

    Simon Gatrall | Product Development Specialist | Open For Work

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 481 PRO

    I did play around with a ton of values with varying levels of smoothness. I'm sure damn near all of the options I tried were good enough for production work, but I did just have an idea that might spiral me down a rabbit hole into G3 continuity induced psychosis. I'll be right back.

  • RamonYipRamonYip Member, csevp, pcbaevp Posts: 139 PRO
    edited December 14

    I like how I just dropped a half-finished proof of concept here and then @Derek_Van_Allen_BD picked it up and gave it 3x more functionality. All just because.

    Ramon Yip | glassboard.com

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 481 PRO

    By relative comparison the reason I invested effort into this function is gonna look real dumb when my other feature is out. I only really needed that first pass with the A to B > B to A lofting.

  • RamonYipRamonYip Member, csevp, pcbaevp Posts: 139 PRO
    edited December 14

    I mean, sure, but it helps me out tremendously, so I ain't complaining. 😉

    I'm also really curious to see what it looks like now.

    Ramon Yip | glassboard.com

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 481 PRO
    edited December 15

    I think these are qualitatively the best results I've been able to come up with. The biggest single difference maker is changing the outer guide curves to G3 flow instead of tangent. With these settings evDistance vs path parameterization doesn't seem to be meaningfully different to my eye so I'm willing to call the distance method superior for performance and cleaner lines. For this particular example anyway.

    image.png

    The combs look nice too

    image.png

    Should the bridge curvature generation be wrapped into the code? Probably another time. I got what I was looking for out of this exploration.

    Edit: actually my blue combs are very slightly marginally smoother on path parameterization mode. Wiggly connections aside, the surface quality is ever so slightly better with the path method.

  • RamonYipRamonYip Member, csevp, pcbaevp Posts: 139 PRO
    edited December 15

    So backtracking for a second, this whole bottomless pit that today has been for you was because I was planning on integrating this back into Loft Fillet which already has bridging curve figured out for it. Only reason I didn't do it in here was because I was solely focused on the mismatched edges.

    So if you wanted to steal the code (or optimize it), there should be some useful stuff inside of the Loft Fillet code. Or else, I can also do it as well. Gotta pick the ball back up at some point.

    Ramon Yip | glassboard.com

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 481 PRO

    I think I'm going to take what I've learned from the path parameterization methods deployed here back into my tween curve script and store the loft connection information in the back of my head for when it's useful for another lower level utility but my slice of the engineering world rarely actually gets to use surface modeling techniques or high quality blends. I'm more of a chamlet kinda guy. Happy to help contribute but I imagine you'll take it further in the end.

  • RamonYipRamonYip Member, csevp, pcbaevp Posts: 139 PRO
    edited December 15

    I can't express my appreciation more for what you put out today. You did it faster (and probably better) than I could have. Either way, I'm excited to see updates to Tween curve. That's also part of what got me started down the FeatureScript rabbit hole as well. So really, you just have yourself to blame.

    Maybe the true development was the friends we made along the way.

    And credit to @Konst_Sh for laying out the parametrization method.

    Ramon Yip | glassboard.com

  • jelte_steur_infojelte_steur_info Member Posts: 609 PRO
    edited December 15

    @ry_gb & @Derek_Van_Allen_BD : Auto Loft Connection is definitely worth publishing separately. I have use cases in mind.
    One of the use cases (can't share it: confidential client work) would have a few straight sections and a few bends in it. I'm not sure the normalized length solution would work well in those cases. an individual evDistance for each case would yield better results i imagine.

    Imagine a square with rounded corners and an offset version of that. the rounded corners with evDistance method would result in lofts for rounded corners and straight pieces, but I think the normalized lengths wouldn't work that well…

    Imagine something like this: I drew this up just for testing.

    image.png

    I imagine a separate Auto_loft_connection would just split edges to make the nr of edge segments match.
    (and perhaps set queryVariables for edges so one could do a manual loft/boundary curves afterwards?
    The only focus there would have to be the edge selection. perhaps a boolean option for qTangent edges and leave it open for the rest to the user to enter edges with a QV?
    In the example i have in mind, i was working with a set of edges that did have to stop at a tangent connection point, and the other set of edges was a combination of edges and curves connecting them…



  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 481 PRO

    @jelte_steur_info that's almost exactly the torture test I had in mind where evDistance would be a superior lofting method than the path parameterized method. It would be worth maintaining both methods as an option because there's no silver bullet for all situations.

  • RamonYipRamonYip Member, csevp, pcbaevp Posts: 139 PRO

    @jelte_steur_info can you share that model again? I wasn't able to access it when I clicked the link.

    Ramon Yip | glassboard.com

  • jelte_steur_infojelte_steur_info Member Posts: 609 PRO

    @ry_gb: it’s public now! I guess I forgot before

  • RamonYipRamonYip Member, csevp, pcbaevp Posts: 139 PRO
    edited December 18

    Link to updated Loft Auto Connection (still WIP)

    I made some updates to Loft Auto Connections (Auto Loft Connections? Connections Auto Loft?).

    Mainly I just cleaned the UI and did what you guys mentioned in the other thread and separated the script into the main script and a function so I can use the functions inside of Loft Fillet. I don't think I needed to add any optional parameters, so I'm only passing the context and edge groups to the functions.

    @jelte_steur_info I tried your part. I sort of got it to work, but I'm having a hard time understanding when it fails.

    It looks like it fails if the reference faces are "perpendicular" to the loft, but succeeds when the faces are mostly parallel to the loft. However, I have a different case where that works just fine. I'm a bit puzzled at the moment, but I'll keep investigating.

    image.png

    Ramon Yip | glassboard.com

  • jelte_steur_infojelte_steur_info Member Posts: 609 PRO
    edited December 18

    Hi @ry_gb:

    good progress! I'm looking into it.

    First off, even though the first loft in your line up is working, these orange lines don't seem to have actually found the shortest distance:

    image.png

    possibly because these edges were already connected and are therefore omitted by your generateNearestDistanceConnections function?
    perhaps an evaluation of how far from the ideal evDistance the actual connection is and filtered that way to still create new connections?

    I'm still trying to find why the loft error "Could not align profiles to loft direction" is coming up…

  • jelte_steur_infojelte_steur_info Member Posts: 609 PRO
    edited December 18

    Hi @ry_gb: here's an alternative approach:

    I've created an 'auto split edges' feature which takes the profile edges and splits them using your generateNearestDistanceConnections function.

    You can copy/use this to debug your function, or see if it can be made robust enough to replace autoLoftConnections.

    I figured with autoLoftConnections, you'll be recreating a lot of the loft Feature and will have to keep updating it as it evolves.

    the idea behind 'auto Split edges' is that the edges are prepared for loft to autoconnect more easily, but leverage the strenght and comprehensiveness of the builtin loft tool. It could also be used for 'boundary faces', and perhaps even work for more than 2 profiles in the future although that will make the 'generateNearestDistanceConnections' harder and/or lead to a whole lot of splits/connections...
    It conveniently can create profile Query variables so that in the loft only those have to be added making the loft feature easy to work with. Not sure how well/robust it will work with lofts built in connection algorithms now we're not spoon feeding it what edgeParameter goes with what, but it may work?

    else it may help in troubleshooting the generatenearestDistance connections function perhaps.

    Kind regards,

    Jelte

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 481 PRO
    edited 4:18PM

    @ry_gb you should fill out the table at the bottom of this article with the Loft Fillet pros and cons comparison with fillets and face blends:

  • S1monS1mon Member Posts: 3,790 PRO

    [That URL has a lot of unnecessary tracking info. This might be safer/better: https://www.onshape.com/en/resource-center/tech-tips/fillet-face-blend-surface-design-tools ]

    I would argue that the table needs a few more items to capture the value of Loft Fillet

    • Maintains width (or tubular offset) control while the dihedral goes to zero
    • Maintains width (or tubular offset) control when the dihedral goes from concave to convex
    • Allows for tubular offset control of the size of the "fillet"
    • Can approach G3

    Simon Gatrall | Product Development Specialist | Open For Work

  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 481 PRO

    Updated to remove tracking info. We wouldn't want @NeilCooke to know I sometimes read his emails, now would we?

  • RamonYipRamonYip Member, csevp, pcbaevp Posts: 139 PRO

    "Tubular offset". Now that's a million dollar term right there.

    That's a great suggestion. Adding a table up top would be helpful to know when or when not to use Loft fillet.

    Ramon Yip | glassboard.com

Sign In or Register to comment.