Why doesn't Sweep2 in GH make Brep?

Hi readers.

I would like to make Brep-pipes from base curves, but Sweep2 component outputs a TrimmedSurface instead of a Brep.Up to the previous version I was able to get the correct results in a similar way, is this a bug?

In addition to that problem, I would like to generate again a Sweep2-Brep transformed by the process C in the GH file, I can’t get a good result. but when I bake the rail and section curves to the Rhinoceros, and then I command the sweep2 via Rhinoceros, I can get the correct result.
I thought the curvature of the rail curve in A might be dirty, so I tried replacing it with B in the GH, since B’s curve is simpler than A’s, but I have yet to get the correct result.

is this the same reason?
I’ve looked at the CurvatureGraph and Seems of the curves, but there doesn’t seem to be anything wrong with it.

I use it in the following properties and version.
Absolute tolerance:0.01units
Angle tolerance:1.0 degrees
Rhino 7, 7.26.22343.17001
Windows 10 (10.0.19044 SR0.0)


Base_CrvToSweep.3dm (201.3 KB)
CheckTest.gh (174.2 KB)

I’m not using all the plugins in your definition so I’m not sure if my assumptions are correct.

Your section curves do not have the same segment count. This will lead to problems.
I baked your sections and deleted the short arc segment.

I tried all sorts of things but unfortunately I don’t know why your sweep2 fails.

Below is a stripped definition where I added a sweep2 with two interpolated rails and a lofted brep.

Maybe someone else can explain why the sweep2 with your rails fails.

sweep2_problem.gh (33.9 KB)

I opened the definition in Rhino 5 and the sweep2 looks just like in the most recent Grasshopper. The sweep2 also fails in Rhino 8 WIP.

I got this to work.
The two rails were in opposite directions.

As for the untrimmed surface problem, turns out it’s (again !) that Brep.Faces.SplitKinkyFaces() method that is not being called automatically by Grasshopper.

sweep2_problem.gh (10.6 KB)

You flipped the first rail, right?

No I flipped the second one. If you flip the first one you also need to reverse the sections list.

This is what I get when I’m flipping the direction of the second rail in the original definition where I had to replace some of the components because I’m not using all the plugins.

To be honest I don’t understand why @user2403 rebuilds the rails with brep brep intersection as the original curves form a correct sweep2. The overall aproach seems a bit complicate to me…

I said the same thing when I opened the definition :sweat_smile:
The workaround I found is from your file, as I also don’t have the plugins.

1 Like

If this object really needs to be trimmed with a surface based on the arc segments provided, I’d do it like this:

sweep2_arc_chamfer.gh (29.9 KB)

@magicteddy @martinsiegrist
Thanks for answering to my question.

In fact, the data contains about 300 or so curves, from which we have extracted the characteristic problems that have emerged. some of the curves are very gentle and can’t be judged well due to tolerances, so there are many areas that are Rebuilt to remove microscopic debris from them.
it’s a compromise at the time though. Thanks for sharing gh files, I will try to see if I can get the whole thing to work with this.

@magicteddy I checked and the curves were definitely not aligned in the right direction that I thought!
I was passing the Flip Curve component just before Sweep2, but the guide input doesn’t seem to be working.

Although Flip Curve accepts a curve as guide input, I recommend feeding it a line, because otherwise the flipping condition relies on fitting planes through the control points, which can fail. If the curve is linear, the vectors going from start to end are compared, and this is usually a much safer approach.

1 Like

Thank you for your detailed tips!

We would appreciate your confirmation.