Sweep trouble

Hi guys,

I’m having trouble performing a Sweep1 with a closed rail.
The operation is successful with open rails using Brep.CreateFromSweep(). With a closed rail I get “Invalid Brep” error.

Neither Brep.CreateFromSweep(), nor SweepOneRail.PerformSweep() returns a valid Brep.

How can I troubleshoot this?

See attached

Sweep1_EntryLevel_V1.gh (123.4 KB)

For the brave:

  1. Modify the code in order to do only pink Breps (otherwise write and release the PinkPantherVirus).
  2. Add a R distort option (random, sin, cos etc).
  3. Add shape rotate/scale options (LOL).

Screen%20Shot%20007

Hi, Peter.

Thanks for the file and your sense of humour.

In fact, the message inside the GH file is at the crux of it all. In the component I’m designing, sweeping along a curve, open or closed, is not the same as sweeping along a polycurve/polyline. And if you try to sweep a polycurve profile along a polycurve rail it gets even trickier. This was the case for my invalid brep.

Your intermediate plane technique helps a lot, but it’s not bullet proof, especially around sharp angles. I don’t get invalid brep anymore, but depending on the set of curves/polycurves and the operations performed, the sweep may fail.
I suppose it always comes down to the multiple self intersections at the small radii inflections of the rail.

Nothing is impossible via the Dark Side (but I must check the classification of some stuff of mine: are they internal [bad news] or public [good news] ?).

In the mean time walk the walk a bit further on (and check case2):

Sweep1_EntryLevel_V1A.3dm (129.6 KB)
Sweep1_EntryLevel_V1A.gh (123.7 KB)

OH, my lord!

Tricky business!

Internal affairs I’m afraid

Moral: Ducatium Amamus Dum Spiramus

Can we see the curves you are working with? Seems fine (as in not invalid, not exactly really pretty :smiley: ) here on some brief tests.

As in the dm file posted with V1A gh def above (“The Lord” first 2 screenshots: shapes with var [sin/cos] distortion [and sweep1 or var pipe]).

BTW: The big thing (for real-life engineering) is the self clash … but Rhino (a surface modeller anyway) SDK doesn’t expose the equivalent of curve intersects with self Method. One (rather naive) way to attempt to deal with that is to do a Mesh and then use the Mesh/Mesh intersection on each Mesh Face (as Mesh). But why to do things like these in Rhino? Just use a proper solid modeller and be a happy bunny.

Screen%20Shot%20018

1 Like

I get the same results (granted I don’t generate the sections, just took them from your output) That’s why I ask what his curves are to know what kind of sections he is using.

Sidenote: Grasshoppers native sweep does fail in the closed cases.

Hi guys!

Well, maybe I just didn’t have this experienced before, but the profile and rail curves compositions was the critical part, I had several curves joining together to create the shapes inside for loops but depending on the set of curves, and the fact that GH somehow sorts the inputs by curve type, let’s say first the curves, then the arcs, then the lines, the profiles created resulted in catastrophic shape… most of the times throwing NullReferenceException when creating the sweeps or the breps.

image

The curves in the example were selected in an alternating pattern: line-arc-line-arc-line-arc-line-arc.
Is there a way to add to the input list exactly by selection order, regardless of curve type?

Never experienced that kind of thing: Inputs are sampled in the order that you sample them:

The Salvador Dali type of stuff are N 1, 6.

But if for some reason you need your onions sorted … just use a List of type object (or GeometryBase) and start asking questions: are you a bird? are you a plane? are you Superman?

The point was to make a custom component where you could freely load up a number of curves and the component would be creating sweeps like there was no tomorrow, but I always assumed the list of curves would be sequenced by selection. Like with yourself, this is the first time I witnessed this type of behaviour, perhaps I never came across this specific requirement before. It was a surprise, nonetheless.
Is this only me, or it’s expected behaviour in GH when setting multiple curves? For your viewing delight:

Yikes (+ Yikes). Maybe is a Karma related thingy (or an Omen/Sign: quit GH + marry a rich girl + get a proper Lambo(*) Balboni => Adios Amigos).

Make some tests with the attached

Lists-makeChaos_V1.gh (12.8 KB)

(*): Avoid any contemporary Ferrari .

Naturally, either way, it would have be a proper vehicle, not the modern “rubbish” we have nowadays. :wink:

Miura is indeed a must have thingy (but that color …).

Also try:

  1. Lancia HF Fanalone 1.6 (less is more)
  2. Lancia 037 (lethal)
  3. Aston DB4 GT Zagato (a 250 GTO beater?)
  4. Ford GT40 (or a proper Cobra 427)
  5. Dino 246 Dino GT (I want, I want, I want)

Haha this thread has gone completely overboard.

The 037 is a beast!! Jesus!
But I’m a sucker for the Alphas. Models like the GT Sprint, the 33 Stradale and the TZ2 are the reason roads were made in the first place. :sunglasses:

Forget Italy > this IS THE PLACE: https://www.alfaholics.com/