Grasshopper sweep 2 rails using slashes

In Rhino it is possible to (partly) control how each of the 2 rails are swept by adding the so called slashes.
How to do it in GH?
I am trying to split in several sweeps trying using the generated end of sweep profile for the next one but this seems to cause a recursion error.
Attached what I would like to do…
Thanks in advance for hints as I am very new to GH.
Frç

I’m not exactly clear as to what you want the end result to be. Can you post your GH definition with internalised geometry?

YY-v2reduced.gh (8.7 KB) !

gh generator attached and picture of difference between GH and Rhino generations

the profile generated is obviously different as can be seen on the right view added now also
Annotation 2020-08-20 165634

Frç

Grasshopper probably refits rails in the component, in Rhino it’s an option:


(gh surface shown shaded)

Thanks for investigating but not sure what refit does and really changes here. Btw this is not avail in Rhino 5?
Nevertheless I painfully but still :slight_smile: just managed to do a GH (attached) which makes slashes (probably not optimised programming…).Swep2-slash-v1.gh (17.4 KB)
Annotation 2020-08-20 183057

Although I dont know yet how to now glue these 6 “slices” in a single surface?

I am curious how you do this animated image ? this can be very helpful :slight_smile:

Just use the original rails and flatten the input of the new profiles you created.
Swep2-slash-v1_re.gh (17.3 KB)

Thanks, this is simpler indeed (although losing the end tail) but I don’t understand how the flatten works here.

You can see the difference it makes in the animation, as the surface approaches the tail it’s similar to as you describe earlier. The fact that the gh component doesn’t have this as an option suggests to me it’s true by default.

Sorry, can’t help with R5, but the gif is made with Screen2gif, a neat little freeware program.

And the use of the solution :slight_smile:

You could also explore loft options, that could help rectify any problems.

In the initial image you posted, the rail curves look different to each other

Here is a version that creates the profilecurves without any other sweep and the surface has the tail in it. The sweep2 is created via using Brep.CreateFromSweep method in C# (since it gives the option for start/end points of the sweep https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Brep_CreateFromSweep_2.htm), hope it’s aviable in RH5, but not sure.

Swep2-slash-v1_re2.gh (15.6 KB)

1 Like

I am indeed not yet so familiar with LOFT to see if indeed usable here.
The 2 rails are indeed different: 2 half-circles of diffrent diameter and center. Sweep by default distributes the profile on identical (angle-wise) sectors on each of them, which is logical, but not what I need which are normals to a third virtiual rail in the middle, with again another diameter and center…

Loft could be used too to create the surface, like this, but it’s slightly different from the sweep2 one:
Swep2-slash-v1_re3.gh (20.0 KB)

But by adding more profile/shape curves the differences get less noticable and network srf could be an option too.
Swep2-slash-v1_re4.gh (21.5 KB)

Thanks! Plenty of constructions I don’t understand yet: a good exercise for me to learn more of this environment :slight_smile:. But the C script doesn’t seem compatible with RH5 : “1. Error (CS0246): The type or namespace name ‘SweepRebuild’ could not be found (are you missing a using directive or an assembly reference?) (line 72)”

Ah damn, then the method is not aviable in RH5, sorry.

According to this old thread SweepTwoRail Class should work in RH5, but it misses the inputs for start and end points so maybe the loft way is a proper workaround for RH5.

https://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_Geometry_SweepTwoRail.htm

Indeed the result from version 3 is different and not what I need, but version 4 seems very good. I saved it and will try to understand it :wink: .
Thanks a lot.
Frç