I’m trying to use the Roadlike function of Sweep1 on Grasshopper.
First I tried to make a simple sweep with: a = rg.Brep.CreateFromSweep
But I’m getting the following error:
Runtime error (ArgumentTypeException): expected Curve, got Guid
I already tried changing the Type hint to curve but it didn’t work.
What am I doing wrong?
sweep_python.gh (8.8 KB)
Replaced with standard R7 Area, works fine. So does Swp1.
Python type hint for ‘rail’ was ‘Curve’ but type hint for ‘shapes’ was not. Setting it to ‘Curve’ fixes that error but otherwise doesn’t help.
Thank you very much!
Now I’m having a different problem.
I figured how to do a Roadlike sweep but the “end point” option isn’t working.
When I change the highlighted text in the image for “end” so the script can use a given point, the node doesn’t return any brep.
I want the end of the spiral to be just like the start.
sweep_python.gh (18.4 KB)
I don’t know but your ‘Start_edited’ and ‘End_edited’ points don’t match End Points of the rail as I would expect? Making them so causes a different error to show up.
I aimed to ensure that the BRep concludes its geometry inside the spiral, as this alignment is crucial for a subsequent boolean operation (i think…). Even after attempting to use the original start and end points, the issue persisted
sweep_python_2.gh (18.3 KB)
I “solved” the issue joining two different sweeps.
Without Python, I would use very small circles as sections at both ends of the rail.
sweep_2023Dec31a.gh (23.4 KB)
All sections can be rotated on their PFrames, of course.