How to not get twist when using sweep2

Hi Rhino/GH community.

I am trying to model a rather simple geometry but get unpredictable result and am out of ideas on how to solve my issue :

I have 3 profiles, 2 rails, and m trying to sweep2 in order to generate a brep. Depending on the profiles I inputthe result is with or without twist.
I try to curate my input geometries as well as I could (orientation/point order, etc…) to avoid twisting.

Does anyone have an idea how to prevent the (unwanted) twisting effect ?

Here is the script if need be :

SWEEP2 but twist.gh (21.0 KB)

Kind regards

Your rails are far longer than the distance between your first and last section curves :bangbang:

Your section curves are far narrower than the distance between your rails, but that’s not the problem. More of a curiosity :question:

The last curve profile does not have corner points in the order as they appear listed from Point List. Those list the the vertices of the exploded rectangles, the endpoints of the lines that comprise the rectangle, and that is not the same thing.

This is not the explanation. I don’t know why the profile is causing problems, but the above does solve the problem.

I don’t know what to tell 'ya buddy. :sweat_smile:

1 Like

Thank you all for your help.

@Joseph_Oster this is just an extract of a bigger project with more sweeps and more things/scripting in the background. Being a professional project I just extracted the relevant geometry that caused problems to seek for help. :frowning:

@Volker_Rakow I tried the seam fix myself before writing to the forum. It gives me erratic result with other sweeps (I just posted an exemple but have several sweeps along the rails) unfortunately - I will get my file and extract an example of a ‘seam-fix-failure’ for you when I get back close to a computer, to see if we can find out if I did something wrong.

I just do not understand why I would need to fix my seams in the first place, so if you guys know why changing the seam fixeq things please let me know. I really tried to curate my geometry as best as I could to input ‘clean’ inputs.
From my understanding my input geometry (rail/profiles) is “right” and should not twist.

This forum is full of questions about Sweep and examples of how they work. Did you look :question:

1 Like

I don’t know about that. I mean, as Joe said:

If I enter the exact, uninterpolated rails to the Sweep2, it has no problems creating the desired brep from the profile curves:

Perhaps a different approach is in order?

This version uses Sweep1 with perp frames aligned with Z. It creates rectangles as sections, using the old sections only for position and dimensions (so could be done differently). Either rail from Sweep2 can be used as the Sweep1 rail.

Perp frames are added at the start and end of the chosen rail curve.


SWEEP_2025Feb17a.gh (31.1 KB)

P.S. I forgot to mention that the CrvProx (yellow group) can be disabled, leaving only two section curves (and PFrames) instead of five. Doesn’t seem to make any difference.

Hey Volker and Joseph !

Thank you so much for your support here.
Indeed I looked up the forums before posting - could not find an relevant topic, do ou have one in mind that I missed and ould benefit from reading ?

As promised here is a second example that i did before posting on the forum and in which I also tried to fix the seams (at least it seems we are looking in the same direction on how to solve it). Please note that the geometry is far away from the origin because the file is geo reference (working with sea level, rhino is set to mm - large objects)

SWEEP2 but twist.gh (40.2 KB)

Surprinsingly i get a twist here as well ! So the “fixed seams” method have not been getting the anticipated result (i.e. no twist)

Also I am wondering : is a problem if the rail is longer than the sweep ?

I know working far from origin is usually not ideal but i like to keep my model geo-referenced to work with other stakeholders/partners - could that cause the issue ?

I like your approach Joesph (working with only sweep one - let see if I can get all my geometry with it.

There are many threads about sweep.

I haven’t followed what you’re doing with seams but must note that seam adjustments only work on closed curves.

I doubt that Sweep1 will fix any problems you have with Sweep2.

The points you find with curve proximity are not necessarily corners of your profiles. In this case you need to find the closest corner from those points.

The way you did it, the profiles had six vertices but they should only have five.

SWEEP2 closest point seam.gh (45.8 KB)

1 Like

I never said that there was not sweep thread : i said i did not find one relevant (to my problem, and with my knowledge) after looking a few one before posting.

That was it - works like a charm. THANK YOU !

Would you knowwhy do I need to re adjust the seams ? (not sure if my maths knowledge is strong enough but I would be curious to know)

You don’t have to.

However if all of a sudden your input curves change and someone isn’t careful maybe it’s worth it…

I did this one a few days ago, a roadway tunnel in five sections:

1 Like