Pinch In the surface after Sweep1 and distance in the mirrored Geometries

I am bit new to the grasshopper and rhino. I am working on the attached grasshopper script. I started with the 2 section curves and one rail curve as shown below:

image

However, when I use sweep1 then I am getting a pinch at the top point.

After that when I mirror and offsetsurface then there is a gap between the mirrored surfaces along with the distortion at the same point. Can anyone guide on this aspect.



helmet.gh (20.6 KB)
helmet.3dm (919.4 KB)

I don’t see any attached GH model?

Sorry! New to this forum as well. I have updated my post with presentations and related files

missing

Interesting. I’m surprised it worked as well as it did. I tried a few wacky things but sweep can be so quirky that I gave up. Then I tried the first thing I thought of and it seems to work pretty well? Use Sweep 2 and make the sections the rails and the rail the single section (white group).

There is a visible anomaly between the original and/or mirrored surfaces and the joined halves but that goes away looking only at the join…? :thinking: When I bake it and look at zebra surface analysis, it looks good, though there are slight discrepancies along the seam.

helmet_2023Feb15a.gh (26.1 KB)

P.S. I think I found the source of the anomalies in what I posted. The vector Y value for the very first BzSpan component at the top of the canvas is 1 and should be 0. It was the rail and is now the section. Its ends must be precisely parallel to the X axis and perpendicular to the YZ plane.

Yes, zebra surface analysis in Rhino is better, though not perfect.
helmet_2023Feb15b.gh (25.8 KB)

This looks complex but bear with me, it illustrates a fundamental property of NURBS curves that is critically important to avoid a hard point or crease when matching curves/surfaces on a mirror plane. I learned this very early in my CAD musings with double-ended boat hulls. Same goes for this helmet.

The BzSpan components produce only four control points. When ‘Start tangent (At)’ and ‘End tangent (Bt)’ are pure ‘X’ vectors (‘Y’ = 0), both ends of the section curve are parallel to the X axis and perpendicular to the YZ plane, which is exactly what you want.

Rebuild Curve adds control points that spoil the end tangents, You can see this by zooming in to the white control points nearest each end; they don’t have the same Y values as the end points. Text panels (purple group) show the difference in Y between ‘Errant CPs’ and ‘End Points’.


helmet_2023Feb16a.gh (38.0 KB)

The basic fix this code does is replacing the errant Y values with the endpoint Y values to create the blue points. Fixed! Full stop. The crease when joining the mirrored half surfaces disappears.

This code goes one step further by offering sliders (blue group) to move the repaired control points in the X direction, front and back of the helmet, either to match the original curve better or to modify it.

The yellow group is optional, disconnected and can be ignored. Its purpose is to explore the minimum number of control points needed for Rebuild Curve ‘N’, instead of the default 10.

2 Likes

Perfect! Thank you very much. It is working.

Here, I have an another problem. As per your recent solution, the sweep2 is looking a bit squeezed as shown by green surface. However, the original bend along z-axis would be as per given curve. Is there any solution for this as well?

Oh dear. That apparently happened when I first used Sweep 2 two days ago when I swapped rail and section curves. I didn’t notice, wish I would have known… Make a new plan!

Maybe add another section at the widest part? I cobbled something together (gray and cyan groups) but Sweep 2 stops at the second section, only half way. :thinking: And it doesn’t follow the original curve anyway. Discouraging. Maybe add a tiny section curve at the top? Or multiple sections where the cyan values are determined by plane intersections with a third rail, the “Requested Bend profile” in your image?


helmet_2023Feb17a.gh (37.4 KB)

I really don’t know which approach to take at this point. I even considered going back to the original Sweep 1 solution you started with and trying to fix the “pinch” in a different way but at this point, it’s more work than fun so I’m losing interest. Maybe later. :man_shrugging:

P.S. I just tried a desperate and pathetic hack, contouring the old Sweep 1 surface and using the results as section curves for Sweep 2. :man_facepalming: It took some work to cluster the tangent fix and apply it to all the contour curves but in the end, I have the same problems of Sweep 2 stopping at the last section (which I also hacked) and a worse “pinch” anomaly at the top. In addition, the surface is rippled. AWFUL! I’m embarrassed to post this but it’s food for thought…

1 Like

One last try for now. This version ‘17c’ discards the Sweep 2 and uses a disentangled copy of the FixTan cluster (still used on the Sweep 1 rail) called FixTanZ. It’s used for the Sweep 1 section curves and is modified to fix only one control point near the end (top) and fixes Z instead of Y. It looks fairly good until you bake the green group and look at zebra lines in Rhino (‘Analyze | Surface | Zebra’). Then you can see that top point is still a little funky. Better but not perfect. A better algorithm is needed.

helmet_2023Feb17c.gh (34.2 KB)

P.S. Have you considered modeling this helmet in Rhino SubD?

1 Like

After all that work, I have realized something important that makes it unnecessary.

All of that is true except for the last sentence, to which a caveat must be added. Rebuild Curve has a ‘T’ (Tangents) input to “Preserve curve end tangents”. Default is False but if you invert that (make it True), the correct tangents produced by the BzSpan components will be kept.

:man_facepalming: All that work for nothing!! (except for setting Y = 0 on the rail BzSpan)

The pinch at the top remains, an artifact of Sweep 1, but the seams are fixed by simply inverting the ‘T’ inputs for three Rebuild Curve components - the rail and two sections.

helmet_2023Feb17d.gh (25.4 KB)

1 Like

Thank you so much Joseph. Let me complete the model and share it with you.

If you want to control more accurately the front view of the helmet, another curve is required on the side. This unfortunately means a Sweep3 (or Sweep4 for the entire surface) is required and Rhino can’t do that.

Using some Scale1D shinanigens, I made this work with a loft though.
Curves were drawn in Rhino directly but could be built in GH. All the work above by @Joseph_Oster has proven to be very useful to obtain nice curves.

helmet.gh (23.5 KB)

2 Likes

Good morning,

That’s a very creative approach with excellent zebra results. Nice work. I do see an anomaly at the top, due to the very tiny hole used there to “complete” the loft.

helmet_MT_2023Feb18a

I agree that the front view in the original post was a serendipitous fluke with no direct control of the “Required Bend profile”, despite extensive effort to parametrically define front and back profile curves. A third section curve could have been defined there but Sweep 1 worked well without it.

Some minor quibbles about your loft model: :wink:

  • As you said, “Curves were drawn in Rhino directly” instead of parametrically in GH. Not that there is anything wrong with that, but it’s a significant difference.
  • The opening at the bottom of the lofted surface matches your oval section curve in Y but not X?
  • When I opened your file, I saw nothing. All previews are disabled?

I’ve noticed that your GH files always retain the same name as the original post without any version. Windows renames then by adding (1), (2) to the names. For reference, unique names are better.

1 Like

Yet another desperate effort. This one starts with yesterday’s version ‘17d’ and adds the cyan group to “repair” vertical isocurves by inserting a control point with the same Z value as the top point. It looks good but doesn’t stand up to close scrutiny of zebra analysis.



helmet_2023Feb18a.gh (25.7 KB)

P.S. The loft curves can be mirrored to create a “Closed Loft”, which improves zebra.


helmet_2023Feb18b.gh (26.6 KB)

P.P.S. Oh, this is interesting! Rebuild Curves with ‘T’ = True (Preserve curve end tangents) makes zebra analysis very happy indeed. :sunglasses:
helmet_2023Feb18c.gh (30.3 KB)

1 Like

I had no intention of messing around with this any further, I blame @magicteddy :wink:

@rehan - I suspect that less “pinch repair” would be needed if you add a “Required Bend profile” section curve for Sweep 1, with horizontal tangent at the top like the front and back section curves. It would also give you more control over the helmet shape, if you need it.

2 Likes

Thank you so much. Sure I will play with it.

Thank you so much @magicteddy.

1 Like

I did a few more tests with my previous definition - in particular trying to remove that naked edge loop at the top, which I succeded in by creating half the shape and the mirroring it at the end. So the result is not a single surface, but it seems correct through EMap analysis and also the final Brep offsets well without artifact created on the top which seems miraculous.

I’ll call it a day but I think your solution is better. I also tried to divide my horizontal sections, flip matrix and interpolate curves from there, which is essentially your solution without relying on the Sweep1 to start with.

This is incredible there is no option in Sweep2 to continue after the last section up to the end, or a NetworkSrf trick to apply in this case…

helmet hell met.gh (16.3 KB)

This is getting tedious… but the details really do count.

Looking closely at what I posted compared to your Rhino file of the helmet, I see one stray curve:

It is caused by Rebuild Curve with ‘T’ = True, which you want at the top but not at the bottom in this case. Digging deeper, the true cause is Y = 0.307 on the ‘At’ vector for BzSpan that creates the bottom part of that curve. You can fix this by changing the slider from 0.307 to zero, which oddly creates a {0,0,0} vector for ‘At’.

Or you might want to consider a different method for generating these section curves as a single curve instead of joining fragments of BzSpan curves. A single Nurbs curve with the top two control points at the same Z value (56.55) would work well,

1 Like

For example:


helmet_back_section_2023Feb18a.gh (10.5 KB)

The CrvGraph (Curvature Graph) is very useful for making sure the curve is “fair”. Notice that the top two points (highlighted) have the same Z value so the tangent at that end is horizontal.

1 Like