How to maintain height with SubD sweep two rails

Hi - I see there is no option listed to maintain height with the SubD sweep two rails command. I can go back in and manually adjust the SubD edges and faces, but was wondering if there is a more accurate way to achieve an even height of 2mm. These screenshots and the file show the raw sweep2 in SubD without any adjustments.


I also attached the file for reference. The SUBD, CURVES and SURFACES layers should have all the geometry needed.
connector_SubD_sweep2.3dm (232.6 KB)

Thanks for your time.
Kate

Actually, I did make one adjustment - I deleted some faces and inserted a bridge where it intersects.

Here one macro

_Sweep2 _Pause _Pause _Pause _Pause
_SelLast -_Rebuild UP _Pause VP _Pause D=Y O=I _Enter
-_ToSubD U=L S=N D=Y _Enter


Copy and Paste it to command line. (Action run’s on normal Sweep2)
Select Rails, select Profile, Enter, activate Maintain height, Ok
Set U point count = 30 Enter
Set V point count = 6 Enter

At Start and End remove x2 EdgeLoop (while these faces are halved !)

1 Like

It seems you’re looking for an object with constant diameter. Instead of Sweep2 I would use Multipipe. Only requires one curve…

Compared to the SubD in your file you’ll end up with a lighter definition which is easier to edit. SubD in my opinion often starts with just the right topology, then edit / push / pull

connector_SubD_multipipe.3dm (265.4 KB)

2 Likes

Hi Kate, I’d set up the curves like this if the height needs to be controlled:


-Pascal

1 Like

multipipe does not produce consistent height. when curves cross each other or connect into itself you will notice a bulge

Anyway. In this case here I think Multipipe would work well.

unfortunately not when the wish is to have a consistent height.

the problem is also that you can not even correct that easily… i believe @DanielPiker is working on implementing further options into multipipe, maybe it could be possible to have adjoining parts have the same height?

I see. Subdividing once helps a bit but makes editing more difficult.

I asked Daniel to add an option for the orientation of the multipipe a while ago.

Thanks for pointing this out @encephalon.
For junctions of horizontal curves like this the SubD control points are at the same height, but I see this results in a slight bulge in the surface.
To counteract this bulge, the vertex above and below the junction need to be scaled down vertically by 8/9 for a junction of 3 pipes. It looks like this factor changes with the number of connected pipes though.

I’ll see if this can be automated and included in the component/command.

This will result in the top and bottom of the junction being at the same height as the rest of the pipe. There will then be a tiny dip in the height of the pipe around the junction. I don’t think it is possible to completely get rid of this while keeping the same vertex count though.

1 Like

experimenting with a different modeller from a different 3d application also using catmul clark subd it seems that there is a general limitation on height continuity.

1 Like

Amazing and thank you Eddi as this was the first macro I used. I set the U to 28 and the V to 8 so I could delete and bridge at the intersection with matching edge loops.

I couldn’t figure out this last part below; it worked regardless.

At Start and End remove x2 EdgeLoop (while these faces are halved !)

Thank you Pascal, your suggestion worked as well; plus it helped me to understand sweep 2 rail a little better.

Also - thank you @martinsiegrist. While your post encouraged me to try multipipe for the first time, the result didn’t mimic the curve precisely enough. Additionally - even though I neglected to mention it - I was looking for a solution that would work with cross sections other than circles (ie. rounded rectangle conic corners). Much appreciated though!

1 Like

I mean there edges marked in the picture, is optional for SubD division Rule…

U 28 = 28 - 3 = 25x Subdivisions in one direction or 27x with there two halved faces.
V 8 = 8x Subdivisions on Pipe in other direction.
Sw2toD

Ah - okay thanks @eddi it is slowly sinking in. I started with a U point count of 28, then I deleted the two halved edge loops per your advise, resulting in 25 subdivisions. I guess this creates a cleaner model? Here’s how it is looks now. And I see where it ever so slightly dips at the bridged intersection which is fine for my purposes. The rest of this thread is WAY over my head.

to wit, cleaner in uniform divisions but not in precision.

In practice You must decide the way himself.
All solutions listed here have their sense.

With first method three ways are applied. (inside Macro)
Sweep2 for Surface (Creates Surface from Sweep2)
Rebuild (Creates new UV Layout on this untrimmed, single Surface)
ToSubD (Converts this Surface to SubD object)

and you determine a number of divisions on Your SubD,

Rule x(divisions) + 3 on U-value (with removal of two edges)
or
Rule x(divisions) + 5 on U-value (without removing the edges)

Example You need 50 divisions on this SUbD object
Input U Value = 50 + 3 (with removal of two edges)
or
Input U Value = 50 + 5 (without removing the edges)

There more rules but let’s not make it more complicated :wink:

1 Like