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.

Wrapping a sketch onto a surface

I need to transform a sketch (splines, lines, arcs etc) from the planar sketch world onto a cylindrical surface. I'm pretty sure that in SW you can wrap a curve lying on a planar surface onto any other surface, using a simple u,v transformation (points -> 3D splines on surface). Have one of you guys already created a Feature Script for this?

Any clues as to which functions I should look for if I were to try and create my own FS for this?

Best Answer

«1

Answers

  • lougallolougallo Member, Moderator, Onshape Employees, Developers Posts: 2,001
    I will add you to the request.
    Lou Gallo / PD/UX - Support - Community / Onshape, Inc.
  • brian_raffertybrian_rafferty Member Posts: 2
    I also need a warp feature.  I would like to be able to wrap a "cut-extrude" onto a curved surface, but do not think this is currently possible in onshape....is it?
  • gene_risigene_risi Member Posts: 3
    I also would like a wrap feature (I think) I have a flat sheet that I would like to wrap against a curved surface.
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,890 PRO
    +1
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,890 PRO
    http://store.parametricparts.com/store/p10/CURVED-TEXT-2.0

    https://forum.onshape.com/discussion/5902/curved-text#latest

    This guy figured out how to do it with text it seems... Let's pester them to make the wrap pattern as well :)
  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,137 PRO
    http://store.parametricparts.com/store/p10/CURVED-TEXT-2.0

    https://forum.onshape.com/discussion/5902/curved-text#latest

    This guy figured out how to do it with text it seems... Let's pester them to make the wrap pattern as well :)
     @dave_cowden is the man, love his work. I am sure he would be able to do something.
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    @brucebartlett  @john_mcclary   Oh, that's an interesting feature request. I actually 'cheated' with text. If you look very carefully, you'll see that the text isn't wrapped to a curved coordinate system. What I do is less sophisticated-- i just compute each letter individually and then project it onto the selected surface.

    Onshape tends to have relatively limited support for operations that directly involve surface geometry, from a FS-developer viewpoint.  Let me do some basic digging for you guys and get back to you.   
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,890 PRO
    Thanks for looking into it @dave_cowden
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    Hi All (and especially @gene_risi),

    Depending on your use case, you may be able to use extrude-with-offset to do your projection:
    https://cad.onshape.com/documents/6f18e7ccdb79dc24d6773e60/w/1297cec015af2347da737d67/e/56528bd7be659d0a534ce508

    There is a distinction here between the extrude-with-offset case (which is an orthogonal projection of a sketch onto a surface), and actually wrapping a sketch around the surface (which is more like a decal, and should conform to certain invariances like maintaining the correct surface area).  If you guys need the true wrap, please vote on the above-mentioned improvement request.
    Jake Rosenfeld - Modeling Team
  • dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    edited May 2017
    If the type of projection illustrated by the above example works, I can provide that as a feature. However, i'm fairly sure that's not the request here, because the existing extrude function would be satisfactory.

    @john_mcclary  @gene_risi @hans_haenleincould you provide an example that illustrates what you'd like ( realizing, of course, that you will have to explain using words or writing-on-the-screen what result you want since you can't currently do it in Onshape)


  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,890 PRO
    edited May 2017
    @dave_cowden
    I think this video about sums it up...
    https://youtu.be/hQuyJ2m04p8

    Sorry if the motion is a little disorienting, I'm still getting used to this space mouse..
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,890 PRO
    @Jake_Rosenfeld
    That's cool but need the cut to be "normal" after flattening

  • dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    Ok so what you are after is to start with a sketch, and then do the equivalent of bending it in a curve.

    I'm not familiar with the recently added sheet metal features in onshape but I suppose it can't so that?

    The first and most immediate issue is that in onshape sketches must be on a flat plane in order to be extruded. I think I could project curves into a curves surface, but then we would have a bunch of curves you can't do anything with.

    The operation/steps I could do that would be closest to your desire would be:

    1) thicken the selected surface to the desired thickness. This will create a new solid having one  surface that is offset a fixed amount from the original.

    2) use the selected sketch to trim the body produced in the first step. The outer loop must trim the outside, and the inner loops must cut holes.

    Does that sound right?

  • dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    ok, one other thing-- Turns out i've done something similar in my offset surface feature:

    https://cad.onshape.com/documents/323312569b42b381b93ee95c/w/4feba228409d550cfecc4193/e/4f18ff5b4caf83cc9e65fee9

    In that feature, i re-construct a face from an existing one.  Maybe i could adapt that code. 

    What should the inputs for this feature be? A sketch, and then another surface? or?
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,890 PRO
    I'm not sure what the ideal method should be. But what I'm used to sucks to be honest.

    In Solidworks you create a sketch that is on a plane tangent to the cylinder.
    From there you select the face you are wrapping around.
    Then it wraps your sketch around the face and cuts to a depth (or thru)
    The result is a cut extrude that when flattened will be used on a laser/plasma/waterjet cutter with all the cuts "normal to the flattened sheet face"

    Right now OS does not allow flattening of cylinders, or sketched bends with large radius (a cheat for a sheet-metal cylinder)

    If we get sketched bends with large radius, it would be better to use normal extrudes / hole features on the flat object. Then roll the object accordingly.
    Rather than having to trig-out the entire sketch manually then wrapping it around the object, and THEN flattening it. (from my video you can see how many equations are used for such a simple pattern). And Solidworks doesn't get this perfect every time either...

    Really after a few beers and a little more thinking, I'm backing down on this one until we can at least flatten the object. It really has no use to me :(

    exact flat on the app store is ok for flattening this kind of object. but it is very time consuming and doesn't give anything near the result I get from flattening in solidworks. (I imported the part from solidworks into onshape then tried exact flat)

    Thanks for jumping on this Dave.
    @hans_haenlein Would the above still be what you need?
  • dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    edited May 2017
    gene_risi @john_mcclary

    Consider the image below.



    I have a curved surface and a planar sketch. In this case, the dimensions of the sketch do not match the dimensions of the selected surface.  

    The goal is to 'wrap' this sketch onto the selected surface.  Lets assume that the selected surface could be arbitrary, and also could be periodic ( as opposed to this example).

    Questions

    (1) I  assume that the 'wrap' operation has a single thickness, and that we'll create a solid that is a given thickness, offset in one direction or another from the pictured surface. Right?

    (2) How should we handle the fact that the sketch dimensions does not match the surface?  Do we always 'stretch' it  to fit the target? If not, should we allow the user to select reference points on the surface and sketch to determine where on the target surface to place the sketch?

    (3) how do we handle periodic surfaces? ( for example, a cylinder)

    (4) What should be the result if the provided sketch does not represent a valid face? For example, this situation:


    I think if we work through some of these details, I could take a swing.

  • dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    @hans_haenlein  your thoughts on the above would be helpful as well.
  • dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    @john_mcclary  What is your ultimate intent? Do you want to start with a flat sketch, and then create a 3d model of it when it is curved? Or do you want to start with a curved model and then flatten it?

    I think some of these transformations are actually do-able, but I'm having a bit of trouble completely understanding the workflow you'd like to achieve.
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,890 PRO
    Assumption 1 is correct.

    Assumption 2 the stretching of the metal does matter for the flattened pattern to match the result of the curved pattern (in the case of sheet metal roll forming)

    It would probably be best to start with a flat model, and then curve it in my case.
    If you can pull off having it flat and then forming it as a curve... That would be good enough for me if I can create a version of the pre-curved piece for use in the laser table. Then this would be more viable for my case.

    My ultimate intent is to have a 2D flat pattern of the curved piece in a DXF or Parasolid
    I know I need to figure out the boundaries of the cylinder's face (in my case it's slanted up a because of the helix).
    Then I would like to dimension my holes off any of the 4 boundary lines for design intent.

    The best workflow in my opinion would be to draw the cylinder in it's formed position.
    Then using the feature script, select the face and a sketch plane
    The script should layout a construction square showing the boundaries of the surface selected
    From here you finish the sketch
    then select a depth 
    wrap / extrude

    It may need to be a 2 part script
    one script to create a sketch off of the plane and surface that gives you the boundries
    and another that does the wrap based off a pre-made sketch

  • dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    @john_mcclary  Thanks for those ansers. I think i get it. Let me play around a little and see if i can come up with something that works ( or prove that i cant figure it out, one)

  • brucebartlettbrucebartlett Member, OS Professional, Mentor, User Group Leader Posts: 2,137 PRO
    edited May 2017
    @dave_cowden The workflow @john_mcclary described would work best for me. Create a finished cylinder or cone. Unwrap a boundary to sketch within, add your desired sketch, on completion of the sketch it would be re-wrapped back around the surface. This may also have other use than rolled parts. 

    However, the ideal workflow would be to unwrap of curves in sheet metal and then be able to add a sketch and extrude cut on the flat pattern view window. @lana
    Engineer ı Product Designer ı Onshape Consulting Partner
    Twitter: @onshapetricks  & @babart1977   
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,890 PRO
    @dave_cowden
    another note, (I know I'm asking a lot, and thank you) can you preserver the wrap sketch on the tree, so we can use the "flat sketch" as the export?
  • dave_cowdendave_cowden Member, Developers Posts: 470 ✭✭✭
    Thanks guys, i'll see what I can do. Not sure what i can pull off, but i'll experiment and figure it out.
  • jerome_goyetjerome_goyet Member Posts: 11
    hello everyone, 

    I've got the same request as john_mclary but slightly different.
    Imagine an helix created on a cylinder surface and a revolving solid or surface made from splines, curves and/or lines placed inside the cylinder surface.
    I'd like to wrap or project this helix on my revovling surface in order to get a path.
    I can't figure out if that kind of function is available are feasible with OS.
    Thanks for you support
  • mahirmahir Member, Developers Posts: 1,291 ✭✭✭✭✭
    @jerome_goyet, check out this very similar forum post. I believe it has the answer you're looking for.

    https://forum.onshape.com/discussion/comment/31187#Comment_31187
  • axel_svenssonaxel_svensson Member Posts: 2
    +1
    This is a very important feature.
  • dhbmarcosdhbmarcos Member Posts: 1
    i want to make the prosthesis cover for open source non profit project. This feature is very important for me too. Please can help us?
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,034 EDU
    edited January 2019
    @hans_haenlein
    @brian_rafferty
    @gene_risi
    @john_mcclary
    @brucebartlett
    @dave_cowden
    @jerome_goyet
    @mahir
    @axel_svensson
    @dhbmarcos

    Onshape exposed a feature called opRoll in their latest release.
    It rolls faces from cylinders to planes or from planes to cylinders
    Please see this feature I created with it.

    https://cad.onshape.com/documents/0a110db94725cadd8c9a9b73
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,890 PRO
    Nice! consider it linked
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    @MBartlett21
    @john_mcclary

    I apologize for the inconvenience, opRoll should have been released with an @internal tag.  Please feel free to play around, but the behavior may experience some changes over the next few releases, and there is a small chance that geometry created by this feature will change slightly from one release to the next.  Hold tight to use this in production work.
    Jake Rosenfeld - Modeling Team
Sign In or Register to comment.