Sweep 2 rail not very accurate

I am working to try to create a surface with the sweep 2 rail command. It works but is very inaccurate to the crosssection curves I am providing. If I change the number of U or V’s I can get a better surface, but then it doesn’t align well with the surface I plan to join it to. I can manipulate by hand, but I would prefer to not have to do that. I tried sweep 1 edge, but the top edge gets too ragged. I would use curve network if it wasn’t subd

Sweep 2 Rail Inaccuracy.3dm (1.7 MB)

Hello - for SubD output, adjust the rail segments - to maybe 8 or so.


The surface that I am mating to has 20 so I would like to make it the same so that there are common verticles.

hello - try : Rebuild the top curve with Select Master Curve and pick the lower curve as the master, then sweep on those.


Didn’t work.

I did a NURBS sweep 2 rail. Then I projected the edge loop curves from the inaccurate sweep2 subd onto the NURBS surface. Rebuilt and then used those as cross-sections for the sweep2 subd. Nicer result. Still not perfect, and doesn’t answer my question of why it happens, but better than nothing.


I think the upshot is, if you need precision, SubD is not the very best tool - use Nurbs. You can get pretty close with a SubDLoft, then some adjustments.

Sweep 2 Rail Inaccuracy_maybe.3dm (1.7 MB)


The reason I want to use SubD is for scaling purposes. I feel like it is easier to get a surface that behaves well with cage edit etc with subd

@fpagel01 Here’s my take on it:
DI-138697_SubDSweep2.3dm (1.7 MB)

Your rail and shape curves are not nicely prepared for a SubDSweep2, the rails have different number of CVs and the shape curves do not align with the CVs of the rails.

I added a control point to the top curve, and sheared and scaled the shape curves to follow the edge flow of the SubD that SubDSweep2 tries to create. A SubDLoft between two copies of the rails can help materialize the vertices of that SubD. After that SubDSweep2 seems to work much better.

The problem with the misaligned shape curves is that there is not enough freedom in the shape of the SubD surface to make it interpolate curves that are not along its edges. You would need a lot more vertices to get close to your shape curves.

There might be a way to make SubDSweep2 better at working with mismatched rails, like what Sweep2 is doing with NURBS, but I’m not sure yet. I added this to our tracking system: https://mcneel.myjetbrains.com/youtrack/issue/RH-67701

Thanks. I think this helps. I need a few more minutes to try to wrap my head around it.

My next question is can I make a grasshopper script that does the steps that you did? Can you explain how you sheared and scaled the shape curve?

Edit: Looking at your model it is a little more. It is much fairer than mine.

I used the Shear command in a CPlane containing the end points of the curve I was deforming, and the vertex where I wanted the curve to end. Origin: start point of curve, reference point: end point of curve, target angle: in the direction of the vertex. Then Scale1D with basically the same inputs.

I only did that to smoothly deform the shape curves so that they start and end on a vertex of the future SubD, and follow and edge “column” of the future SubD. The actual commands are not important, ideally you would draw the curves with these constraints from the beginning.

I knew where these vertices would be using the temporary extrusions of the rail curves. I knew what the edges of the SubD would look like by counting vertices on the rails (first vertex from the left on the bottom rail will be connected to the first vertex from the left on the top rail, etc.).

Probably, but often times cleaning input NURBS for a command will be hard to generalize. It might be easier to just clean up the inputs manually, or draw it in a way that works better for SubDSweep2 right from the start. How did you draw the rail and shape curves in your example?

I’ve read this and played about this it a little bit, but haven’t been able to wrap my head around it. I got shear and 1D to manipulate the shape curve, but I can’t do it intelligently to get the result I want.

I understand the topology I want in the end, but not sure how to get there.

I am reverse engineering a boat hull. I have a model of a different boat. my “client” wants it scaled and changed in a few ways. I thought it would be easiest to work in Subd so I can make changes quickly and clearer than with NURBS. That being said I just duplicated the edge for the example model I have and rebuilt them to my liking.