Update2:
Even weirder…it works in GH if I swap the rail and cross-section shape. It’s not giving exactly the result I was expecting, but it is performing the sweep.
Update3:
So, if I swap the rail and shape in the Rhino.Geometry.Brep.CreateFromSweep, it starts working (although I was expecting the sweep to flare outward at the bottom all the way around…which is what happens if you manually perform a sweep1 using the Rhino tools.)
Update4:
Okay, I just realize that when I swap the rail and cross-section, the sweep is skewed because it it is in fact treating the cross-section shape as the rail. So ignore Update3. I still wonder why it won’t sweep the rectangle in Grasshopper, though.
But the reason I’m making that shape is that I’m just experimenting with making ETO forms with sliders that can control geometry, but when I went to make the sweep, it didn’t work. And I spent hours trying to figure out what I was doing wrong. But now I think the problem is in the code since it also doesn’t work in grasshopper and since it does work (in both grasshopper and the python code) if I swap the rail and cross-section curves in the inputs.
in fact I still don’t understand how you are proceeding, first you share a Py script that as far as my (even if not much) knowledge I have not really understood the meaning of the sequence of commands with the purpose you want to achieve, then you mentioned both ETO and in the Py code I do not see a shadow that posted a def of GH, so personally I think that you should first clarify well with which tool you want to solve the problem and focus only on that.
anyway the only thing that at this moment I can suggest to you, and that with whatever tool you decide to proceed the steps are these:
you have to use the Sweep2 command
indicate the first large track of the base
then indicate the second small track the one at the top
and finally indicate the “line” of section that closes everything
ps I would advise you to create the section line using the two start/end points of the two tracks (since I imagine they are both closed curves?) being careful that the aforementioned points cited are corresponding.
second tip, with such simple geometries you could also try using the loft command, so you would simplify everything if the result is ok.
Yes. It does. Changing the curve seam also fixes it in GH. It’s something we don’t normally have to worry about when just using Rhino.
Thank you!
Edit: I did some tests on the circle, and it seems the curve seam is also important for sweeps where the rail is a circle in both python and GH, but by coincidence it was lining up with my cross-section shape in the circle’s case.
And, sorry to pester you, but what does “rc” mean here?
Thanks for your suggestions @0904. What I was trying to do is figure out how to use the python commands, and I couldn’t figure out how this particular command (Sweep1) worked. And then I noticed it also didn’t work in Grasshopper either.
It turns out it has to do with the curve seam. So sweeps in python and grasshopper need to account for the position of the rail’s curve seam, which is something we don’t have to worry about when we’re just using Rhino’s sweep1 tool.