Developing and Flattening Surfaces in Rhino - Video Transcript


Hi, this is Phil from Simply Rhino and in this video, we’re going to take a look at developing and flattening surfaces in Rhino.

The first example we’re going to look at is fairly straightforward. This is a surface which is developable. That means that the surface will flatten out, without any shrinking or stretching and there are a couple of ways in which we can do this.

Now, before we start flattening out this surface, I first of all want to just pick the surface, go to my object properties, and increase the density of the isocurve display. The isocurves essentially represent a number of the parameter curves that are used to actually build the surface. Because our four sided NURBS surface here has a much shorter edge at the top, than the bottom, then fairly obviously, the isocurves start to converge as they progress towards the top of the surface.

Now, I want to make use of these isocurves so that we can see what happens as this surface is developed in a number of ways. So, I’m going to actually create curves from these isocurves, but I’m going to do that by first of all, switching layers here and then running a command from curves and curve from objects, called extract wire frame. This will create curves from the boundary curves, the surface edges and the visible isocurves.

Now, if I go to the actual object itself, object properties, and I’m going to turn off the isocurve display now, so that we can’t see any isocurves. I’m then going to just lock the layer in which the surface is sitting and I’m going to remove the boundary curves and then I’m going to remove every other curve going from top to bottom here, just so we have a more regular size of rectangular portion here on the surface.

First of all, let’s look at unrolling a surface, flattening this out, and this is what we would do if we wanted to create a pattern for this part. So, we do this from the surface menu, and we use this command which is called unroll developable surface. Now before I run this command, the develops pattern is always going to have a corner or a portion that sits on the origin. So, I’m actually going to move this object out of the way a little, just so we can get a better idea of the development as we progress. So, surface, unroll developable surface. I’m going to pick the surface I want to develop and then I can optionally select curves on the surface that I want to unroll. So, I’ll just use my filter for this just select curves only and I’ll pick those curves followed by enter, and you’ll see the developed or unrolled surface. Now, this is a fairly simple example of a developed surface and so our edge lengths here should be highly accurate. So, we can test these by going to analyse, and length, and we can pick for example, this top edge here, 92.580mm, and we can pick this edge here for a comparison, 92.581mm, so it’s a thousandth of a millimetre away from the target and we'd see similar results for the other edges.

So, you can see here that the pattern actually represents the way in which these isocurves are displayed on the surface. So, on the pattern, these isocurves are converging as they move towards the top edge of the pattern. That’s fairly straightforward.

Now, there is a second way that we create curves from a surface which is slightly different to developing the surface by unrolling and this is by creating UV curves. Now, the UV curves are the parameter curves that actually make the surface. So, we’re going to get a slightly different result here than the developed pattern. This is a curve from object command, and the command is 'Create UV curves'. So, I’m going to pick the surface that I want to create the UV curves from, and then just like the unroll command, I’m going to be asked to select the curves on the surface that we want to create UV curves from. So, I’ll go to my filter, isolate and select the curves. Select the filter back, and then just finish command.

This time, you’ll notice that we get a very rectangular result here. I’m just going to move this out of the way, and you’ll also see that the one edge length here is the same.

So, what we’re actually getting with the UV curves is essentially this surface without this shortened edge. So, when this surface is created as a NURBS surface, this edge is shrunk and because of the degree of the surface in V, which is top to bottom in this case, then we get the progression of the shape from the top edge to the bottom edge.

The UV curves are in very simple terms, the maximum length of the notional rectangular surface in the two directions, and here, the isocurves obviously display as a regular rectangular shape. Now, there is a benefit for us in being able to do that, because this gives us a means to an end to put curves back on to my target surface, because there is a reciprocal command which is called apply UV curves.

So, to demonstrate that, I’m just going to switch layers and I’m going to just create a small rectangle here which is snapped to one of the rectangular regions here and I’m going to take that rectangle and also the boundary curve here, and I’m going to change the object layer. I’m going to make sure that my centre snaps on. I’m going to draw an example ellipse here and it just sits inside this rectangle, and then I’m going to repeat this over the rectangular curve here. So, I’m just going to do this with the copy command and the various options on this copy command that allow me to copy at equal distances.

Okay, so then I’ll take this rectangle away, and so now I have a series of ellipses and I can apply these back on to this surface. Let’s just change the layer colour so we can see what is happening a little better. So, the command here is again, curve from objects and this time, it’s apply UV curves. So, I can pick all of the curves that I want to apply on to the surface. These curves by the way, need to sit on the xy plane, and then I can pick the surface that I want to apply them to. You’ll see in applying these to the surface that fairly obviously, these ellipses deform, get narrower, as we progress from the top to the bottom. So, this can be used as a means to an ends to, as in this case, apply a regular pattern on to a developable surface and then we can unroll that surface and it’s attendant curves and create the correct pattern for this three dimensional object.

Okay, now we’ve seen that first simple example, let’s now take a look at how the way in which a surface is built, influences the way in which the development behaves. Here we have a couple of three dimensional curves and a couple of straight lines and I’m going to build a very similar surface but build it in two different ways.

So, first of all, I’m going to use the edge curve command on these four curves on the left, to create an untrimmed surface and on the right, I’m going to loft these two two dimensional curves and I’m going to trim the top and bottom of the loft, to give me a trimmed surface.

Now, when we look at these surfaces like this, the two look very similar and indeed, their surface area is the same and their boundary is the same. However, if we select both surfaces and we increase the isocurve density, as in the previous examples, you can see that the surface structure in these two surfaces is quite different.

If we do something similar to previous, so we extract the wire frame from these two surfaces, let’s just put them on this layer here. Then turn this off and just remove these boundaries. Okay, and then let’s have a look at the development of these.

So, let’s first of all take a look at unrolling this surface and let’s make sure that we turn the isocurve display off of these as well. So, unroll developable surface, and then pick the curves. There’s the result and let’s repeat the process for this one over here, and fairly obviously, that’s the result of that one. So, you can see that although the curves on the surface are moving in different directions, the boundary is absolutely identical.

The difference occurs when we come to use the UV curve command. So, create UV curves, that’s this one over here, and create UV curves and we’ll look at this one over here. You can see this gives us a very different result, because this is an untrimmed surface and so these 16 rectangular portions here represent the 16 rectangular portions here. Whereas here, this is a trimmed surface and those rectangular portions would in fact extend beyond this curved boundary here.

So, the relevance of this is that if you are using the command where you are moving from 2D to 3D, so for example flow along the surface, if you can use an untrimmed surface like this example on the left, and a UV grid like this one here, then you can get a much more easily controllable result than you can on a trimmed surface. So, just to very quickly demonstrate, if we use this grid here, and we put an array of identical components on here, group them together, we can use flow along surface, pick the array, use the plane option here to mark the boundary, and click on the appropriate corner of this surface, and you’ll see that this array of objects deforms on to the surface and the objects reduce in size, basically, according to the structure of the surface.

If we flow the objects, again using the same process on to the trimmed surface, then what’s going to happen is that the flow is going to not recognise the trim and recognise the untrimmed boundary of the surface. So, it would be much more difficult to create a local set of components here, because all of these components would need to have some curvature to them, and most of the 16 components would need to be different. So, it would be a much more difficult routine to work out, than by using the untrimmed surface on the left.

Polysurfaces as well as single surfaces can be unrolled. Here we have a fairly basic model of a paper or card carrier bag, and let’s just move this again, away from the origin and look at the alternatives for unrolling this. So, again we can use the unroll command and when we use this command on a polysurface, the explode option and the label option comes in to play. So, here I’m going to say no to both the explode and the labels option, and just look at the result we get here.

So, here you can see that the coincendent edges are, where possible, kept together so that we can actually have a cut out pattern in this case, that we can fold and fold back in to the three dimensional bag. For complex shapes, we can turn on the labelling and the idea of this is that we’ll then get some annotation darts on particular edges, that we can match up to particular edges here and also if I turn the labels off, we can explode the faces that we are developing, so that each one of our faces is on a separate surface. So again, with that option, it may make sense to use the labelling so that we can see where each part fits relative to the next part.

All of the examples we’ve looked at so far, have been simple developable surfaces. These will flatten without any stretching or shrinking of the material and unroll, for example, like a sheet of paper. These surfaces are always linear in one direction. Now, if we try to use the unroll surface command on a double curved surface, we’ll see in the command line that Rhino will report that the unroll surface command won’t work on the surface because it’s doubly curved. The command line also suggests using the smash command. Now smash is one of the two commands in Rhino that will attempt to flatten a surface with double curvature. With the smash command however, one of the surface directions, either U or V, is always treated as being linear. You can make the choice in the command line option, or let the command choose, by using the natural option. So, let’s have a look at the smash command working.

Now, first of all, I’m going to go to my object, and just for clarity, I’m going to turn off the isocurves and I’m also going to show on a separate layer, some curves that I’ve already pulled off the surface that are extracted isocurves. So, again, we can see the structure of the surface.

So, let’s take a look at using smash. We can choose, if we have a polysurface, whether to explode and use labels and keep the properties, and indeed, we can use smash on an example like the paper bag that we looked at previously and achieve the same result as unroll.

So, here I’m going to pick the surface and then I have the option for the linear direction, and I can choose natural, which will let Rhino decide or I can choose U or V. So, let’s choose U and then I can select the curves on the surface that I also want to unroll and run the command. So, this is the result that we see here, and let’s just move this out of the way and let’s run this again, using the V option.

Okay, so you can see here, the smash command is doing some strange things with these curves on the surface. So, the structure of the surface isn’t really preserved during the flattening. What happens is this, is that if we look at the U example here, and we look at the boundary lengths, we’ll see that this length is considerably shorter and here is the same. So, it keeps the edge length of the one direction, and likewise with this command here, it will keep the edge length of this direction. So, this is the direction here in this case, that is being treated as being linear and you can see this by the almost straight lines that are running through here.

So, clearly this isn’t really going to give us a realistic development of this shape, because we would expect all four side of this shape to be curved. So, we could use this as a starting point and maybe start to work out our own development of the surface, but there is probably a better way of achieving this in Rhino.

Now, there is another command that we can use which is called unroll surface UV, and this is a version of the smash command that will actually preserve the UV direction of the target surface. The smash command is, itself, going to be somewhat arbitrary. So, let’s just have a look at unroll surface UV. Options are exactly the same as smash and let’s choose the U direction here. Pick the curves on the surface to unroll and take a look at this. Now, let’s just examine this in wire frame. Here you can see now that this command preserves the surface structure as compared to this one here. So, if you are for example wanting to use this as a means to an end to go 2D to 3D, then this is a better way of progressing. So, the UV direction is maintained and the structure of these curves on the surface is a little better. Let’s just have a look at this in the other direction. So, linear direction V, curves on the surface to unroll. I should have moved this out of the way beforehand. Okay. There we go. So, now you can see that these curves are actually now straight, whereas here, they are not equally spaced and they are slightly less than straight as well.

So, this is a command where you will get exactly the same boundary condition, but you will get a better internal representation of any curves that you have on the surface. Now, of course, if you want to use a similar process for using for example, flow along surface, then you can still use create UV curves. Create and apply UV curves. This command will work on any type of surface, whether it’s a single or double curvature. Of course, with this type of surface, it’s difficult to work out which side is which here. So, you might want to, for example, first of all, check the direction of the surface, and then maybe put some sort of marker curve on to the surface here, like this, and just take that curve and pull it on to the surface and then this is going to give me a reference as to which corner is which. Okay, so I now know that this corner equates to this corner here.

So, again, this is a valid way of being able to take a regular object and to push it back with using something like the flow command and have the object actually move in the UV direction of the surface.

So, we’ve seen that the smash command is fairly limiting and the smash command works really, only reliably on surfaces that have a very small amount of double curvature. If we have a surface as we’ve looked at which has got quite a pronounced double curvature, then the best results that we’re going to get for flattening this are going to come from a command called squish. Now the squish command allows for stretching and shrinking of the material as it is flattened out in to the pattern. Now, this command is a type in command only and has a number of options. So, first of all, I type in the command and you will see, I have some command line options.

The first option is to split the seams. So, if we have a shape for example, which is more convoluted than this shape, then we can open out those seams as we flatten out the surface to help us create a better pattern. Preserving the boundary will attempt to conserve the lengths of the, in this case, our four edges, and then we have a deformation option. This allows us free deformation which will both stretch and shrink locally where it needs to, to flatten out the shape, and then we can choose to stretch mostly, only, compress mostly, etcetera, and we can use our own custom set ups here. So, let’s choose free for the moment. Then we can choose a material, either a floppy or a rigid material, and this really is fairly self-explanatory. If we’re trying to deliver something for example, for a shoe upper, we would choose a floppy material. If we were trying to develop something for example, like a steel or a metal panel for the side of a bolt hole, we would use the rigid option. Outside up will put the pattern in the direction of the surface normal or in the reverse direction, if the down option is chosen, and the decorate option will give us some points on the surface which shows where in fact the surface has shrunk and where it has expanded.

So, let’s take a look at this command, and we’ll use the decorate option. Saying, yes, deformation using free on a floppy material and we’re trying to reserve the boundaries. So, we pick the surface and then as usual, we can pick any curves on the surface and then we can enter to run the command, and you can see here that we have a mixture of red and green dots. The green dots are where the pattern is stretched and the red dots are where the pattern is compressed and these annotation markers here, show me the percentage of where the maximum amount of compression is. We’ll also see a repeat of this in the command line as well.

Whatever layer we have active when we run the squish command is where the red and green annotation will be placed. So, it’s a good idea to do this on the separate layer and then you can keep this annotation and not have it affecting the surface or the curves on the surface.

Let’s now have a look at what’s happened with the edge lengths on this. So, the idea is that because of the options that we used here, then the command is going to try and maintain these edge lengths, but they are probably not going to be accurate. Now, if we just analyse the length of the curve on this edge here, and that is 234.842 and compare it to this edge here, you can see here it is 225.334. So, this edge length has increased and of course, you would expect that, because most of the pattern has actually expanded in order to develop our shape.

Now, there are ways actually that we may be able to constrain those boundary proportions, much closer to this if that in fact was a driving factor, and we’ll look at that in a moment. But before we do that, one of the things that is important to understand with the command, is that this surface here that is generated is actually going to be a trimmed surface. And for that reason, if we look to analyse the length of the surface edge, then this will select as one complete trimmed edge. So, it might be wise if you needed the four separate edges to make sure that you pick those as part of the curves on surface objects, or indeed you have these separately as a series of curves that you picked, just so that you end up with a curve here that describes that edge. It then makes comparing edge lengths a lot easier.

If we want to control the edge length a little better, we can look at using the custom settings when we use squish. So, we run the squish command and we’ll use a custom setting here for the deformation and we set the custom set up here and we choose a preset to modify. We have three presets, all of which will default to the same value to start off with. I’m going to choose A and we have a control for the boundary stretch, the boundary compression, the interior stretching and the interior compression. If I use increased value of around 200 for the boundary, and for the interior compression here, this will restrain the boundary and the surface from being expanded too much. Take the surface, and then the curves on the surface and have a look at the result. So, you can see that the pattern now starts to look different and you can see the way here, in which the isocurve that we extracted on the surface are now being treated slightly different at the edges. So, there is something of a penalty for trying to match these edge lengths here in the shape of the pattern. Let’s just have a look at what length we get. Here the target was 225, and here, if I pick that edge, now we’re 227, and here on this edge, we are 169 and here, we’re 165. So, you can see that by using these custom controls, we can create boundary lengths which are closer to the existing. But remember with a shape like this that you would expect the boundary length on the pattern to probably, particularly with a floppy material, be longer than it already is in the three dimensional shape.

Finally, let’s look at running squish and going back to the defaults, which is free deformation, preserving the boundary and not splitting the seams and using a floppy material. I’m going to turn off the decoration, and I’m going to once again, produce the curves on the surface. There is a reciprocal command to squish, which is called squish back, and this allows me to, for example, to put some curves on to the flat pattern, or indeed points on to the pattern, and squish them back on the three dimensional object. So, let’s just take a look at this.

So, if I use some text that I’m going to convert in to curves, and place this on here, scale this slightly, place this on here, then again by using a type in command which is called squish back, I can pick the 2D pattern and then the curves that I want to squish on to the surface, followed by an enter and you’ll see these push themselves on to the surface.

Now the advantage in the squish back and the squish command is that even if you’re not going to use the developed pattern as a means for production, it’s a really nice way of being able to iterate between 2D and 3D, and here for example, if we undid that squish back, and let’s say I wanted to make my text so it ran along this more closely, along this isoline here, then obviously on the pattern, I could use the bend command, select the text and maybe bend this twice, once this way, It might be better if we group this as well, pop this down to here and then bend it the other way.

Okay it needs a little bit more work in the middle, but you get the general idea, and then now, if we apply this on to the surface using the squish back command, we can get this text to fit a little more closely to the isoline.

So that’s a brief introduction to flattening and developing surfaces in Rhino. I hope you’ve found this useful and, if so, please ‘like’ this video. To be kept informed of new videos as they are posted you can subscribe to this channel. At Simply Rhino we deliver a series of classroom courses and can deliver bespoke training either on-site or in our own training room. You can find details of all our upcoming courses on our website. Thanks for watching.


  • 6024
  • Last modified on Monday, 04 December 2017 17:55
Request Call Back