Hi Guys … I’m aware that the SWEEP2 has a bug that doesn’t allow to keep the same height, which is really annoying and I hope someone will fix soon since is a fundamental component for my workflow.
Anyway searching on internet I found many people having the same problem.
I saw this Python component but it seems not working properly.
does anybody know why he’s not able to keep the second rail of the curve ?
the uploaded .gh file has some sorta plugin
you said it was python? it was probably compiled into a .ghpy and you’ll have to upload it
otherwise the native Sweep2 component seems to work just fine…
the native sweep isn’t working while the “same height” function that I need … isn’t working
No matter if you put on true or false … it doesn’t change anything.
Wondering why in RHINO 5 and previous versions of GH the sweep was working perfectly and now not anymore. Plus … they aren’t fixing this really annoying problem since forever.
The component was compiled in Ghpy yes … Strange that isn’t working … I’ll upload again when I’m in the office.
I looked at out bugtracked items, and found this: RH-45110.
When I open the definition in Rhino 6, I get this:
I probably need the same component that you have found.
Any ghpythonlib.components call uses the component itself. This is why you will get the same results. ghpythonlib places a component in a definition, runs it for you, and gives you the results after the solution completes.
I tried to bump issue RH-45110. As this is something that @DavidRutten already investigated, you’ll have to wait for his response.
I hope they will find out because I cannot do a proper job without a SWEEP2 working properly.
and It seems a Problem that occur since many years … which scares me a lot.
As I said some guys solved this Problem with a Python script SWEEP 2 …. but with me doesn’t work since is not able to Keep one of the 2 rails … or sometimes is just not generatic any sweep
you can disregard the need to wait part of my previous reply; I noticed that the SDK has been improved in between, so this can be fixed in a small scripting component (for last Rhino 6 SR).
Here the Python source:
import Rhino as rh
r2 = rh.Geometry.SweepTwoRail()
r2.MaintainHeight = H
A = r2.PerformSweep(R1, R2, S)
You posted a ghpythonlib.componentbase, which is just calling the Grasshopper component. ghpythonlib.componentbase is not an SDK, it’s just a reflection of Grasshopper.
I think I understand the problem of the shape of the second curve now. This has been fixed in Rhino WIP.
I have no idea what the difference is. I imported Rhino.Geometry and instantiated a SweepTwoRail. Thought that was an API call.
And yes the WIP does what I expect now. Can it go to a SR so non-WIP can enjoy the benefit as well?
Sorry, I had opened another script from another place and thought it was yours. The script read:
import ghpythonlib as ghl
ghl.components.Sweep2(A, B, S, H)
Your script is fine. It does work as well in Rhino WIP. And the component itself also works fine in Rhino WIP. And also this sniplet works in Rhino WIP.
So I tried but it’s not working.
This sweep is a part of a big Project I’m working with …
I attach the files ( I Highlighted the Problem with a RED GROUP and a LABEL " PROBLEM HERE " )
The Problem is that your script works only with one profile ( at least on my Project ) but as soon I connect the other profile there’s no output geometry anymore ( which is the same Problem I had with similar scripts I found already in internet )
On top …. actually I trimmed the curves to work with 2 open curves ( since I read it’s easier to avoid the Problem of the same height ) but in real I would Need a proper sweep 2 with same height between 2 CLOSED curves ( It’s a ring shank )
Hope you can help me because I’m really getting crazy just for a simple sweep and it block all my work since I get a result I don’t want.
Thanks again for your precious help drop_1ct.3dm (757.6 KB) Drop_1ct.gh (895.0 KB)
I found on the web this but I’m not a programmer so I have no idea how to fill the C component with this.
Also I’m not able to do a Copy/paste ( paste isn’t highlighted )
Would you be able to help me with this ?