Hey everyone,
I’m having trouble creating a shape in Grasshopper that’s supposed to look like the one in the attached picture.
I’ve already created the rail curves and the section curves, but when I use the sweep function, I end up with a weird, twisted shape. It works somewhat in Rhino, but not perfectly. I’ve also tried using the Network Surface and the Automatic Network Surface parameters, but neither seems to work.
I’m not sure what I’m doing wrong—can anyone help me figure this out?
Thanks a lot in advance!
Sweep_KS.gh (18.4 KB)
Sweep_KS.gh (17.4 KB)
It’s something to do with the direction of the curves think…
Just flip one of them.
The Guide Curve input can be useful if you want to automate this with lots of curves… it will only flip the curves that do not match the guide curve so you end up with all your curves in the same direction.
Sweep_KS_1.gh (18.4 KB)
2 Likes
At first, your post had no GH files, now it has two with the same name
Yes, the easy way to see it is by connecting both rail curves to Point On Curve. As you move the slider, points on each curve should move the same direction. These go opposite directions.
3 Likes
You are my hero! Thanks a bunch, I didn’t think of that at all.
May I ask an additional question: Is there a way to make the sweep surface tangent to the bottom surface? In Rhino, there is usually the option to choose ‘Position’, ‘Tangent’, ‘Curvature,’ etc. Is there something similar in Grasshopper, or do I have to draw section curves on the side?
Again, thank you so much!
Sorry about that! I somehow updated the file but wasn’t able to delete the previous one. Apologies for the confusion.
But thanks for the great advice!
I misunderstood your question. I made the bottom surface tangent to the sweep surface when you asked for the other way around. I can think of ways to remove the bump and maybe a way to answer your real question, but I’ve spent too much time already and have other things to do.
Sweep_KS_2024Oct22a.gh (32.3 KB)
I don’t know is the honest answer!
You are moving towards a loft rather than a sweep if you create section curves all the way around your rails.
It probably is easier to control the section curve tangency around the rails though?
I don’t think there is any control over tangency at the edges using Sweeps. I had a look at other Sweep components from various plugins that I have installed but I couldn’t see any other control inputs.
Here is a way, but it ignores your section curves and creates new ones that are tangent at the bottom to the extruded surface. Needs work (maybe Graph Mapper?) to control the shape.
Sweep_KS_2024Oct22b.gh (32.4 KB)
1 Like
That is absolutely amazing, thank you so much for taking the time and helping me out even though you’re busy. Really appreciate it! When I download both the files a and b I find the same script in both files (script a with the bottom surface being tangent). Would you be so kind as to upload the b script so I can have a look at it and try tweak it? Big thanks!
No worries, thanks for having a look and checking out the script, that’s very kind. I hope to come closer to what I am looking for with @Joseph_Oster’s script
1 Like
Oops!! I seem to have lost version ‘b’, but you can recreate it from this version ‘c’ by replacing the Graph Mapper with a single sider. I think the Graph Mapper is better because it varies the section curves, though it still needs work to match your originals.
Sweep_KS_2024Oct22c.gh (33.1 KB)
1 Like
Incredible! I deleted the front and back curves with the cull index, added the original section curves as well as the new side section curves to a curve param and used them as new sections for the sweep and tadaaa just what I wanted. I can’t thank you enough, you really helped me out there!!
Sweep_KS_2024Oct22d.gh (31.5 KB)
2 Likes
Bravo! Good idea. I’m surprised you don’t have to worry about section curve sequence? And of course, it’s not fully parametric anymore so will break if you change the first slider from ‘6’ but whatever works, eh?
P.S. By the way, I don’t think your original front and back section curves are as well formed as the curves I created? But they seem to work.
I’m surprised as well, honestly haha! I didn’t think it would work.
That’s true , but for now, it serves its purpose .
Sorry, I didn’t quite understand the last part. Could you explain what you mean by not as well formed? Thx
My curves are tangent because they are NURBS curves affected by the middle points being moved away parallel to the surface. I see a break where yours meet the bottom curve.
You are right, didn’t see that I will consider rebuilding the curve