Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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
hans_haenlein
Member Posts: 9 PRO
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?
Any clues as to which functions I should look for if I were to try and create my own FS for this?
5
Best Answer
-
lana Onshape Employees Posts: 707@hans_haenlein
Curve modification you are describing is not quite the same as a result of opRoll. opRoll is designed to do length preserving roll onto developable surface from plane or from developable surface to plane (unroll). The functionality you are describing could be implemented as a custom feature script using evFaceTangentPlanes() to generate points on surface and opFitSpline to generate 3d Curve.5
Answers
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
Twitter: @onshapetricks & @babart1977
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.
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.
@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)
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..
That's cool but need the cut to be "normal" after flattening
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?
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?
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?
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.
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.
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
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
Twitter: @onshapetricks & @babart1977
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?
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
https://forum.onshape.com/discussion/comment/31187#Comment_31187
This is a very important feature.
@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
IR for AS/NZS 1100
@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.