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.

How do I create holes perpendicular to a Freeform Surface

ron_morelandron_moreland Member Posts: 77 ✭✭
 I want a series of holes in a lofted surface. I want each hole perpendicular to the surface. I've extracted a curve from the surface and I placed a point along the curve at each hole location. How do I instance a part at each point normal to the surface?

Answers

  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,799 PRO
    edited December 2015


    Mines a trivial solution because my surface is an extruded spline. 
    -intersect the surface with plane
    -create an intersection curve between plane and surface
    -create a line thats tangent to the curve at a point
    -create a line thats perpendicular to the tangent line

    This produces a lot of extraneous geometry but it can be. It'd be better to have a 3D sketch and make this assignment.
  • ron_morelandron_moreland Member Posts: 77 ✭✭
    I tried that. My surface is lofted splines, not a simple extrusion. Creating a plane through the point normal to the surface is tricky.
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,799 PRO
    edited December 2015
    I thought I could get'r done with compound sketches, but d-cubed failed me.

    here's my ugly loft:



    I create a random point on the surface by intersecting with an extruded surface:


    I create a normal based on this:


    I extrude this normal:


    I try to create a 2nd normal on this extruded surface thinking 2 2d sketches can create any 3d line in space:


    So I try to make a tangent assign to the line and intersection curve and I think d-cubed knows I'm trying to create a surface normal and says "no way dude". I think this is a bug.

    I believe this would have been your surface normal. 

    Do you have any other puzzles I can work on before the x-mas break?

    They're releasing the programming interface soon, if I get in, I'll look into taking 1st derivatives of u,v and then I'll cross them. This will give you the surface normal. I guess I'd have to return a mate connector back to you with z being the normal. Maybe I could create a sketch with zero at the point on the surface. They're really the same thing aren't they.


    Not sure what they'll be exposing in their API.




  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,799 PRO
    Re-reading my post, I'm not sure compound sketches would produce a surface normal, mathematically speaking. There's one solution to your problem and would the 1st derivatives of any u,v directions converge on the solutions. Don't know if this is true. 

    It is a hard problem to solve when armed with 2d sketches.


  • ron_morelandron_moreland Member Posts: 77 ✭✭
    I can't try it yet, but I think it takes 4 planes. 2 planes crossing the point in any orientation, not necessarily orthogonal. Draw normal lines in each plane. 1 more 3-point-plane made from the normal lines. one more normal line half way between the other 2. Finally a drawing point normal-plane. YUCK!
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,799 PRO
    edited December 2015
    Can you send a screen shot, I think I'm following you.

    It's a lot geometry isn't it for one freak'n vector.
  • ron_morelandron_moreland Member Posts: 77 ✭✭
    Yeah, it's a lot and it's not enough. To get the normal, the real normal, I need 3 orthogonal planes, x,y,z, that intersect the point and 3 normalized vectors, then a way to add them... just a little crazy given OnShapes tool set. This needs a solution, a new constraint perhaps.
  • ron_morelandron_moreland Member Posts: 77 ✭✭
    edited December 2015
    Got it! In only about 7 steps, 3 planes, 2 curves and one line!
    1) intersect the surface with any plane or other surface passing through the Point. If you pick this plane or surface well, the extracted curve will work for more than one hole.
    2) extract an intersection curve, Curve1, with this plane and the surface.
    3) create a curve point plane with the extracted curve and the Point
    4) extract another curve, Curve2, from the new plane and the surface, this should give you 2 curves orthogonal to each other at the Point.
    5) Draw a line on the  curve point plane with one end constrained to the Point
    6) Add a normal constraint between the line and Curve2.
    7) Make yet another plane, a point normal plane with the line and the Point

    ... Yeah! a Drawing plane tangent to the surface at the hole point.....

    Good Grief. Fortunately I only need 4 holes, with symmetry, just 2.
  • billy2billy2 Member, OS Professional, Mentor, Developers, User Group Leader Posts: 1,799 PRO
    Good job! sounds easy
  • michael_krugermichael_kruger Member Posts: 3 EDU
    edited March 31
    I need to do this, but with 40 holes!  :'( I wish the hole tool had a function to make hole normal to any surface.

    Looks like there is at least now a slightly faster way with the 'T plane' feature script, which gives a tangent plane at a point, but still have to draw and extrude a hole manually at each point.
  • S1monS1mon Member Posts: 888 PRO
    The surface pattern featurescript might help: https://cad.onshape.com/documents/6988ff60065e4c34350ca5e1/v/e99365d434ff9c23ec4ea36a/e/60aef8ba8da96a42c3831a4d

    There's also one called "Texture" which solves slightly different problems.
    https://forum.onshape.com/discussion/16576/texture-new-custom-feature

  • matthew_stacymatthew_stacy Member Posts: 361 PRO
    @Toshimichi_Oda, splitting the surface with profile vertices corresponding to hole centers and then thickening an offset face (zero offset copy) to establish surface normal vectors is very clever.  I like the way you think!

    Establishing surface normal vectors for sketching would be be so so much easier if Onshape supported 3d sketching.  Similarly, I suspect that someone could develop a feature script to establish surface normal at specified vertices.

    I was surprised to learn that mate connectors (for sketch coordinate planes) could not be aligned directly to an edge of the thickened face.  Kudos to you for figuring out that a bridging curve would work.  Upon further experimentation I found that a 3d spline curve will also work.  Here is my minimum functional model, building on your work:
    • Extruded a splitting surface to establish four vertices for surface-normal-sketch-origins
    • Thickened zero offset copy of split face to establish direction of surface normal
    • Added 3d spline to align sketch mate connectors


    Thus far, your work-around is the best that I have seen for establishing a surface normal vector.  Thanks for sharing.
  • emagdalenaC2iemagdalenaC2i Member, Developers, Channel partner Posts: 755 ✭✭✭✭✭
    Un saludo,

    Eduardo Magdalena                           C2i Change 2 improve                           ☑ ¿Por qué no organizamos una reunión online?   
                                                                         Partner de PTC - Onshape                                      Averigua a quién conocemos en común
  • Toshimichi_OdaToshimichi_Oda OS Professional Posts: 44 PRO
    Hi, @matthew_stacy
    I am glad that this helps you.

    As you say I think that using 3d spline is better.

    Because I did similar modeling with SolidWorks before, I can't help comparing.

    In Solidworks
      feature 'Trim surface' trims a surface with sketch without extruding.
      feature 'Thicken' makes a solid body that has line edges.
      feature 'Sketch' with preselecting a edge makes a sketch-plane from an endpoint of the edge and a direction tangent to the edge, even if the edge is not a line.

    In Onshape
      The upper face which is made by 'Fill 2' is expected to have four line-edges and four arc-edges.
      'Part 2' which is made by 'Thicken 1' is expected to have line-edges.
       But we cannot make a implicit mate connector on one of them as line or arc.

    I believe there is still room for improvement in Onshape.  

    Even with the above I like mate connector and I am willing to use Onshape.


  • eric_pestyeric_pesty Member Posts: 342 PRO
    Late to the party but you can skip the bridging curves and create planes using the "point curve" option. I don't understand why you can't use this to define a mat connector axis but it's valid for a plane though!

Sign In or Register to comment.