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.

tangent manipulator behavior

EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
I'm trying to work out a way to make a point on a curve with a linear manipulator (inspired by the new Loft connections). My thought process has been:
  1. measure the curve.
  2. divide 1 by the curve length to make the manipulator offset distance correspond to the new parameter value needed to move along the curve.
  3. use a clamp() function to limit the values from 0 to 1 for the parameter
I still seem to be getting values jumping around a lot. I put together an example of what I'm trying to do. Any input is appreciated. Am I close?
https://cad.onshape.com/documents/8f9ced588efde6aeb961179b/w/82fc597da85b474ebe34145b/e/0e2af702f669ec1a43004265
Evan Reese

Best Answer

Answers

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,212
    Answer ✓
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    Thanks @ilya_baran
    I like this approach much more than mine (surprise surprise ;) ). You're just figuring out where the new manipulator would be, then snapping it to the closest spot on the curve, right? I haven't messed with DistanceResult at all, and I'll have to play with it to understand how to use the parameters there.

    This is actually a great step toward solving another issue further down on my list. You may have guessed I'm working to add curves as a reference option for Freeform Spline since it would make it so much more useful for surface modeling. I'd like to make a change function that snaps the point to the closest point on the reference curve when it is selected (rather than defaulting to a parameter of 0.5, which would feel jumpy most times). This seems like it might work for that too.

    Thanks!
    Evan Reese
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    @ilya_baran
    I'm getting some weird behavior from your example, my Freeform Spline feature, and the Loft connections when using certain edges as references. Any idea why the edge type would matter? See below. The first example is a loft between two solid body edges, and the connections have trouble. But if I use Fit Spline on the edges, and loft between the splines, it seems ok, even though the resulting geometry is nearly identical.


    Evan Reese
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    here's the one lofted between fit splines instead. it works much better

    Evan Reese
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,212
    @Evan_Reese can you post a link to a public document version with the bad behavior so I (or someone else) can take a look?
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    edited February 2021
    @Evan_Reese can you post a link to a public document version with the bad behavior so I (or someone else) can take a look?
    I hindsight I should have lead with that

    https://cad.onshape.com/documents/627921b62c5d8c4a56037b12/w/a9c16309dec5ac1100147873/e/fb5201dd1135a895113e01ea

    I put a few examples of features with edges for references that don't do so well, and features where the same edges have been produces with Fit Spline that work as expected.
    Evan Reese
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,212
    Looks like a bug -- thanks for reporting.  We'll investigate when we get a chance.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    Looks like a bug -- thanks for reporting.  We'll investigate when we get a chance.
    Thanks, Ilya.
    Evan Reese
  • Henk_de_VlaamHenk_de_Vlaam Member, Developers Posts: 240 ✭✭✭
    Looks like a bug -- thanks for reporting.  We'll investigate when we get a chance.
     :) 
    Henk de Vlaam (NL)
  • EvanReeseEvanReese Member, Mentor Posts: 2,135 ✭✭✭✭✭
    Looks like a bug -- thanks for reporting.  We'll investigate when we get a chance.
     :) 
    Thanks to @Henk_de_Vlaam for pointing it out to me in Freeform Spline which made me dig a bit and find it.
    Evan Reese
Sign In or Register to comment.