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.

Options

tangent of surface along U or V

adamohernadamohern Member, OS Professional Posts: 216 PRO
I can create a plane that is tangent to a surface at a given point.

1) How can I force the plane to align its X axis to the U or V direction of the surface at the intersection point?

2) How can I more generally extract the U or V tangent direction of a surface at a point?

Comments

  • Options
    kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    We don't have something for that exposed (though of course you could approximate it with multiple calls to evTangentPlane).

    I'm curious: What do you want UV directions for? In general, neither the end user nor the FS user has control over the internal parameterization of a given surface, so writing code that depends on the parameterization could behave differently than you or the end user expects.

  • Options
    adamohernadamohern Member, OS Professional Posts: 216 PRO
    edited May 2016
    Mainly for experiments with generative design tools in Onshape. With generative designs it can be fun to flow repetitive or evolving patterns across the contours of a surface, and in some cases you'll want that to flow right along the U or V direction of a surface. Google image search "generative architecture" for examples.
  • Options
    lougallolougallo Member, Moderator, Onshape Employees, Developers Posts: 2,001
  • Options
    adamohernadamohern Member, OS Professional Posts: 216 PRO
    Thanks Lou, but I'd already gotten this far. My question is about defining the X-direction of the plane to be parallel to either the U or V of the tangent surface. As it is, the x-direction is simply canonical, with no option for alignment with the flow of the surface.
  • Options
    billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 2,014 PRO
    edited June 2016
    Thanks for sharing solution Lou, I'm currently working on this. Your T Plane is nicely documented.

    So I have a skPoint (a point in a sketch) and project this to the blue surface then create a plane. This is Lou's cool solution.



    Things of interest:
    -When querying a skPoint, world coordinates are returned. This is good because I don't have to transform it to know where it is in world space. The bad is that it doesn't know about how it was created ie.. what's the direction of the plane it was created on. 

    -The projection is a minimum distance from the point to the surface vs. a normal projection from sketch to surface.



    If you are trying to create a 3D point on geometry using this technique, one would expect a normal projection based on the sketch view. The minimal distance isn't intuitive.

    Using a sketch to create a 3D point on a surface will be off because evDistance returns minimal distance and not normal distance.

    Gray line is the minimal distance and the orange line is the normal projection from sketch which is what I want.

    Using a 2D sketch to generate a 3D point with a minimal distance projection isn't going to be intuitive and therefore not really a good way to create a 3D point on geometry. I'm trying to figure out how to generate a normal projection.


    Is there an ev..... function that'll give you the intersection between a vector and a face?


    Thanks for your help Lou,

  • Options
    dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    Hi, I created a feature that does ( I think ) exactly what you are doing. It provides ability to create a plane tangent to a surface and aligned with a direction.  It ends up being pretty tricky for aribrary surfaces, but with some math its not to bad for built- in surfaces:

    https://cad.onshape.com/documents/0de04acb5bac92ca16796edf/w/cdd1d1882311084fe54bff24/e/daaec91732ca5add243c90dd

    See "Create tangent plane aligned with another vector"
  • Options
    adamohernadamohern Member, OS Professional Posts: 216 PRO
    Thanks Dave. I knew how to do that as well. The problem is getting the actual U and V tangent directions for an input surface. That's what this thread was meant to be about from the beginning. Creating tangent planes on a surface is trivial. It's aligning them to the flow of an arbitrary surface that's impractical.
Sign In or Register to comment.