Polyline segments for Sweep1?

Hi all,

Ran into an issue with the rail curve for the Sweep1 component. This is probably known to most and possibly a redundant discussion, but I’m putting it out there just in case anyone else stumbles upon the same problem.

In the attached file, I’m trying to sweep a rectangle along a (white) polyline rail curve. (The control points of this curve vary not just in xy but also in z.)

The initial attempt fails (creates a ‘bad’ sweep). The issue seems to be that the Sweep1 command uses the ‘wrong’ number of segments, since when I rebuild the curve with x+1 segments, the new (green) polyline works as expected.

Not exactly a question I guess, but wouldn’t it make sense for Sweep1 to adopt this behaviour in the first place? Maybe I’m overlooking scenarios when the first behaviour is expected and desired?


200402_sweep1-question.gh (16.2 KB)

Bumping my own thread here as I ran into further issues and might have been wrong earlier – and now there is a question.

In the attached example (and for uncountable other tests), the sweep fails despite my rebuilding the curve. If I change the width of the rectangle I’m sweeping along the rail, it works again (that is, it works when the profile I’m sweeping is narrow enough).

The problem is, I need the dimensions of the rectangles I’m sweeping to stay what they are, which means the sweeps will fail. Is there a different and better way of going about this using Sweep1? Alternatively, are there other and more intelligent ways of making this work, like, uhm, lofting between perpendicular frames positioned at discontinuities in the pline, or something?

The situation is basically: given plines the control points of which change in all directions, how can I sweep (extrude) a rectangle along this curve in a mitred and ‘ordered’ fashion, without loads of self intersections?

Geniuses like @Joseph_Oster and @Helvetosaur seem to have dealt with Sweep issues in the past – any ideas for this one? Anyone else? Prettyplease?

200402_sweep1-question-2.gh (22.7 KB)

Final bump (sorry): @Michael_Pryor: I’m sure there is a simple (or ‘simple’) solution to this using Pufferfish’s twisted boxes – would be incredibly grateful if you could enlighten me?




I have no idea why you are rebuilding your rail curve?

Did you try that?

Your expectations are probably unreasonable…

Hey Joseph, thanks for picking up the thread.

I’m trying it as we speak. Not quite getting it to work still though (please see the attached file, now with the Pufferfish component removed – sorry).

200402_sweep1-question-3.gh (28.0 KB)

And: rebuilding the rail curve made the previous example work. I now realise I probably jumped to conclusions there, but am still not quite sure why rebuilding it gave me the sweep I wanted that time around, so any hints as to why it had that effect (pure luck?) would also be welcome.

No thanks.

sweep1_2020Apr2a.gh (9.5 KB)


That was sort of where I was going.

Those lofted connecting ends won’t really work this time I’m afraid, they need to be sharp.

I’m probably not understanding the component properly - is the reason it works when the rectangle’s edge length is 2000 (as in the image below), but not when it’s 3200 simply “the way it is” (due to how ‘sharp’ the polyline is) or is there a way around this?

In other words, are my expectations unreasonable, as you said?

Well, a bit of tinkering got me there in the end (I think). Sweep3, anyone?

It certainly doesn’t (yet) have the nice mitres of the Sweep1 component, but this does the trick for me at this time.

Thanks @Joseph_Oster for pushing me in the right direction!

200402_sweep3.gh (10.6 KB)

Hm… Just realised there are rotation issues with the perpendicular frames. Back to (almost) square one.